A059426 First differences of A026273.
1, 2, 2, 1, 2, 1, 2, 2, 1, 2, 2, 1, 2, 1, 2, 2, 1, 2, 1, 2, 2, 1, 2, 2, 1, 2, 1, 2, 2, 1, 2, 2, 1, 2, 1, 2, 2, 1, 2, 1, 2, 2, 1, 2, 2, 1, 2, 1, 2, 2, 1, 2, 1, 2, 2, 1, 2, 2, 1, 2, 1
Offset: 0
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.
a003622 n = a003622_list !! (n-1) a003622_list = filter ((elem 1) . a035516_row) [1..] -- Reinhard Zumkeller, Mar 10 2013
A003622 := proc(n) n+floor(n*(1+sqrt(5))/2)-1 ; end proc: # R. J. Mathar, Jan 25 2015 # Maple code for the Wythoff compound sequences, from N. J. A. Sloane, Mar 30 2016 # The Wythoff compound sequences: Let A = A000201, B = A001950. Then AA = A003622, AB = A003623, BA = A035336, BB = A101864. The eight triples AAA, AAB, ..., BBB are A134859, A134860, A035337, A134862, A134861, A134863, A035338, A134864, resp. # Assume files out1, out2 contain lists of the terms in the base sequences A and B from their b-files read out1; read out2; b[0]:=b1: b[1]:=b2: w2:=(i,j,n)->b[i][b[j][n]]; w3:=(i,j,k,n)->b[i][b[j][b[k][n]]]; for i from 0 to 1 do lprint("name=",i); lprint([seq(b[i][n],n=1..100)]): od: for i from 0 to 1 do for j from 0 to 1 do lprint("name=",i,j); lprint([seq(w2(i,j,n),n=1..100)]); od: od: for i from 0 to 1 do for j from 0 to 1 do for k from 0 to 1 do lprint("name=",i,j,k); lprint([seq(w3(i,j,k,n),n=1..100)]); od: od: od:
With[{c=GoldenRatio^2},Table[Floor[n c]-1,{n,70}]] (* Harvey P. Dale, Jun 11 2011 *) Range[70]//Floor[#*GoldenRatio^2]-1& (* Waldemar Puszkarz, Oct 10 2017 *)
a(n)=floor(n*(sqrt(5)+3)/2)-1
a(n) = (sqrtint(n^2*5)+n*3)\2 - 1; \\ Michel Marcus, Sep 17 2022
from sympy import floor from mpmath import phi def a(n): return floor(n*phi**2) - 1 # Indranil Ghosh, Jun 09 2017
from math import isqrt def A003622(n): return (n+isqrt(5*n**2)>>1)+n-1 # Chai Wah Wu, Aug 11 2022
s=(3,5,7,9,11,13,...); a=(1,2,3,5,6,8,...); b=(4,7,10,14,17,21,...).
k=2; r=-1; mex:=First[Complement[Range[1,Max[#1]+1],#1]]&; s[n_]:=k*n-r; a[1]=1; b[n_]:=b[n]=s[n]+a[n]; a[n_]:=a[n]=mex[Flatten[Table[{a[i],b[i]},{i,1,n-1}]]]; Table[s[n],{n,30}] (* s = A005408 except for initial 1 *) Table[a[n],{n,100}] (* a = A184117 *) Table[b[n],{n,100}] (* b = A184118 *)
A184117_upto(N,s(n)=2*n+1,a=[1],U=a)={while(a[#a]1&&U[2]==U[1]+1,U=U[^1]);a=concat(a,U[1]+1));a} \\ M. F. Hasler, Jan 07 2019
a026274 n = a026274_list !! (n-1) a026274_list = map (subtract 1) $ tail $ filter ((== 1) . a035612) [1..] -- Reinhard Zumkeller, Jul 20 2015
r=(1+Sqrt[5])/2; a[n_]:=Floor[r*r*(n+2r-3)]; Table[a[n],{n,200}] Table[Floor[GoldenRatio^2 (n+2*GoldenRatio-3)],{n,60}] (* Harvey P. Dale, Dec 23 2022 *)
a(n)=my(w=quadgen(20),phi=(1+w)/2); phi^2*(n+2*phi-3)\1 \\ Charles R Greathouse IV, Nov 10 2021
from math import isqrt def A026274(n): return (n+1+isqrt(5*(n+1)**2)>>1)+n-1 # Chai Wah Wu, Aug 17 2022
Comments