cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A035489 Main diagonal of the Stolarsky array.

This page as a plain text file.
%I A035489 #29 Apr 16 2023 08:43:07
%S A035489 1,6,18,39,81,157,309,576,1042,1885,3338,6011,10569,18321,31851,55717,
%T A035489 95320,163580,278208,478807,814329,1374926,2328359,3963782,6656320,
%U A035489 11209356,18772741,31524784,53186481,88750072,148471480,247281057,415039507,692181268
%N A035489 Main diagonal of the Stolarsky array.
%C A035489 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
%H A035489 Alois P. Heinz, <a href="/A035489/b035489.txt">Table of n, a(n) for n = 0..4765</a>
%H A035489 N. J. A. Sloane, <a href="/classic.html#WYTH">Classic Sequences</a>
%p A035489 a:= proc(n) local t, a, b;
%p A035489        t:= (1+sqrt(5))/2;
%p A035489        a:= floor(n*(t+1)+1+t/2);
%p A035489        b:= round(a*t);
%p A035489        (<<0|1>, <1|1>>^n. <<a, b>>)[1, 1]
%p A035489     end:
%p A035489 seq(a(n), n=0..33);  # _Alois P. Heinz_, Mar 22 2023
%t A035489 a[n_] := Module[{t = GoldenRatio, a, b},
%t A035489    a = Floor[n*(t+1) + 1 + t/2];
%t A035489    b = Round[a*t];
%t A035489    (MatrixPower[{{0, 1}, {1, 1}}, n].{a, b})[[1]]];
%t A035489 Table[a[n], {n, 0, 33}] (* _Jean-François Alcover_, Apr 16 2023, after _Alois P. Heinz_ *)
%o A035489 (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))}
%Y A035489 See A007064 for references.
%Y A035489 Main diagonal of A035506.
%Y A035489 Cf. A001622.
%K A035489 nonn,easy
%O A035489 0,2
%A A035489 _N. J. A. Sloane_
%E A035489 More terms from _Randall L Rathbun_, Jan 25 2002