Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Revision History for A007336

(Bold, blue-underlined text is an addition; faded, red-underlined text is a deletion.)

Showing entries 1-10 | older changes
Signature sequence of sqrt 2 (arrange the numbers i+j*x (i,j >= 1) in increasing order; the sequence of i's is the signature of x).
(history; published version)
#42 by N. J. A. Sloane at Wed Sep 11 00:36:40 EDT 2024
STATUS

proposed

approved

#41 by Brady J. Garvin at Wed Sep 11 00:34:44 EDT 2024
STATUS

editing

proposed

#40 by Brady J. Garvin at Wed Sep 11 00:10:58 EDT 2024
MATHEMATICA

Quiet[Block[{$ContextPath}, Off[General::compat]; Needs["Combinatorica`"]], {General::compat}]

STATUS

approved

editing

Discussion
Wed Sep 11
00:11
Brady J. Garvin: Replaced `Off` with `Quiet` in order to comply with <https://oeis.org/wiki/Style_sheet_for_Mathematica_programs#About_error_messages>. This was my error from not being a regular Mathematica user; I mistakenly thought that the effects of `Off` were block-scoped, not global.
#39 by Sean A. Irvine at Tue Sep 10 23:31:15 EDT 2024
STATUS

proposed

approved

#38 by Brady J. Garvin at Mon Aug 19 14:26:49 EDT 2024
STATUS

editing

proposed

#37 by Brady J. Garvin at Mon Aug 19 14:21:17 EDT 2024
MATHEMATICA

Block[{$ContextPath}, Off[General::compat]; Needs["Combinatorica`"]]

memos = <||>;

zeroBasedC[theta_, i_] := zeroBasedC[theta, i] = Module[{memo, depth},

memo = Lookup[memos, theta, {-1, 0}];

While[memo[[-1]] <= i, AppendTo[memo, memo[[-1]] + Ceiling[theta * (Length[memo] - 1)]]];

memos[i] = memo;

depth = Combinatorica`BinarySearch[memo, i] - 3/2;

If[IntegerQ[depth] && depth <= i, 1 + zeroBasedC[theta, i - depth], 0]

];

A007336[i_] := zeroBasedC[2^(1/2), i - 1] + 1;

Table[A007336[i], {i, 1, 100}] (* Brady J. Garvin, Aug 19 2024 *)

STATUS

proposed

editing

Discussion
Mon Aug 19
14:24
Brady J. Garvin: Also added a Mathematica translation of Python code, which is faster than the one-liner already given and doesn't rely on knowing sufficient bounds for the table of S values beforehand. Not sure if the code would be considered too long by OEIS standards.
#36 by Michel Marcus at Mon Aug 19 12:51:55 EDT 2024
STATUS

editing

proposed

#35 by Michel Marcus at Mon Aug 19 12:51:42 EDT 2024
LINKS

Clark Kimberling, <a href="http://faculty.evansville.edu/ck6/integer/intersp.html">Interspersions</a>

Clark Kimberling, <a href="http://faculty.evansville.edu/ck6/integer/intersp.html">Interspersions</a>

STATUS

proposed

editing

Discussion
Mon Aug 19
12:51
Michel Marcus: G before K
#34 by Brady J. Garvin at Sun Aug 18 22:24:35 EDT 2024
STATUS

editing

proposed

#33 by Brady J. Garvin at Sun Aug 18 22:24:09 EDT 2024
CROSSREFS
STATUS

proposed

editing