login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A035489
Main diagonal of the Stolarsky array.
3
1, 6, 18, 39, 81, 157, 309, 576, 1042, 1885, 3338, 6011, 10569, 18321, 31851, 55717, 95320, 163580, 278208, 478807, 814329, 1374926, 2328359, 3963782, 6656320, 11209356, 18772741, 31524784, 53186481, 88750072, 148471480, 247281057, 415039507, 692181268
OFFSET
0,2
COMMENTS
General solution for the Stolarsky array by row, column is given by the PARI/GP program. Solution for the main diagonal in A035506 is found by setting r=c. If computing large terms for the Stolarsky array, increase the default precision of PARI/GP to accommodate the size. - Randall L Rathbun, Jan 25 2002
LINKS
N. J. A. Sloane, Classic Sequences
MAPLE
a:= proc(n) local t, a, b;
t:= (1+sqrt(5))/2;
a:= floor(n*(t+1)+1+t/2);
b:= round(a*t);
(<<0|1>, <1|1>>^n. <<a, b>>)[1, 1]
end:
seq(a(n), n=0..33); # Alois P. Heinz, Mar 22 2023
MATHEMATICA
a[n_] := Module[{t = GoldenRatio, a, b},
a = Floor[n*(t+1) + 1 + t/2];
b = Round[a*t];
(MatrixPower[{{0, 1}, {1, 1}}, n].{a, b})[[1]]];
Table[a[n], {n, 0, 33}] (* Jean-François Alcover, Apr 16 2023, after Alois P. Heinz *)
PROG
(PARI) {Stolarsky(r, c)= tau=(1+sqrt(5))/2; a=floor(r*(1+tau)-tau/2); b=round(a*tau); if(c==1, a, if(c==2, b, for(i=1, c-2, d=a+b; a=b; b=d; ); d))}
CROSSREFS
See A007064 for references.
Main diagonal of A035506.
Cf. A001622.
Sequence in context: A370349 A271252 A271541 * A219143 A122061 A333713
KEYWORD
nonn,easy
EXTENSIONS
More terms from Randall L Rathbun, Jan 25 2002
STATUS
approved

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy