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.

Previous Showing 21-25 of 25 results.

A197878 a(n) = floor(2*(1 + sqrt(2))*n).

Original entry on oeis.org

4, 9, 14, 19, 24, 28, 33, 38, 43, 48, 53, 57, 62, 67, 72, 77, 82, 86, 91, 96, 101, 106, 111, 115, 120, 125, 130, 135, 140, 144, 149, 154, 159, 164, 168, 173, 178, 183, 188, 193, 197, 202, 207, 212, 217, 222, 226, 231, 236, 241, 246, 251, 255, 260, 265, 270
Offset: 1

Views

Author

Zak Seidov, Oct 18 2011

Keywords

Comments

First differences are 4 and 5. Also, there is no immediate pattern in parity of a(n).
Are similar sequences well defined (in terms of rounding problems)? See also A086843, A086844, A196468.
Answer: I would not call the sequences A086843, A086844, A196468 'similar' to (a(n)). The first differences d =5,5,5,5,4,5,5,5,5,4,... are a Sturmian sequence (d(n)) with slope alpha = 2 + sqrt(8) and intercept 0. We give d offset 0 by setting d(0):=4. By Hofstadter's Fundamental Theorem of eta-sequences, the chunks 45555 and 455555 occur following a Sturmian sequence with density beta = (sqrt(8) - 2)/(3 - sqrt(8)). Since beta = 2 + sqrt(8) = alpha, the sequence (d(n)) is fixed point of the substitution 4->45555, 5->455555. See A197879 for a complete description of the parity pattern of (a(n)). - Michel Dekking, Jan 24 2017

Crossrefs

Cf. A001030. - Michel Dekking, Jan 24 2017
A bisection of A003151.

Programs

  • Magma
    [Floor(2*(1 + Sqrt(2))*n): n in [1..100]]; // G. C. Greubel, Aug 18 2018
  • Mathematica
    Table[Floor[((2+Sqrt[8]))*n], {n,100}]
  • PARI
    a(n)=2*n+sqrtint(8*n^2) \\ Charles R Greathouse IV, Oct 25 2011
    

Formula

a(n) = A003151(2n). - R. J. Mathar, Oct 20 2011

A249039 a(1)=1, a(2)=2; thereafter a(n) = a(n-1) + a(n-1-(number of even terms so far)) + a(n-1-(number of odd terms so far)).

Original entry on oeis.org

1, 2, 4, 7, 11, 17, 26, 37, 52, 70, 92, 120, 157, 200, 254, 323, 401, 490, 597, 719, 859, 1021, 1211, 1438, 1687, 1979, 2325, 2740, 3183, 3704, 4262, 4863, 5553, 6350, 7201, 8174, 9216, 10336, 11545, 12894, 14350, 15928, 17646, 19526, 21596, 23893, 26352, 29060, 32060, 35406, 39167
Offset: 1

Views

Author

N. J. A. Sloane, Oct 26 2014

Keywords

Comments

Suggested by A006336, A007604 and A249036-A249038.

Crossrefs

A249040 and A249041 give numbers of even and odd terms so far.

Programs

  • Haskell
    import Data.List (genericIndex)
    a249039 n = genericIndex a249039_list (n - 1)
    a249039_list = 1 : 2 : f 2 2 1 1 where
       f x u v w = y : f (x + 1) y (v + 1 - mod y 2) (w + mod y 2)
                   where y = u + a249039 (x - v) + a249039 (x - w)
    -- Reinhard Zumkeller, Nov 11 2014
  • Maple
    M:=100;
    v[1]:=1; v[2]:=2; w[1]:=0; w[2]:=1; x[1]:=1; x[2]:=1;
    for n from 3 to M do
    v[n]:=v[n-1]+v[n-1-w[n-1]]+v[n-1-x[n-1]];
    if v[n] mod 2 = 0 then w[n]:=w[n-1]+1; x[n]:=x[n-1];
    else w[n]:=w[n-1]; x[n]:=x[n-1]+1; fi;
    od:
    [seq(v[n], n=1..M)]; # A249039
    [seq(w[n], n=1..M)]; # A249040
    [seq(x[n], n=1..M)]; # A249041

Formula

For n > 1: a(n+1) = a(n) + a(n - A249040(n)) + a(n - A249041(n)) by mutual recursion. - Reinhard Zumkeller, Nov 11 2014

A131882 a(0)=1; thereafter a(n)=a(n-1)+a([n/Phi]), where Phi=(1+sqrt(5))/2, the golden ratio.

Original entry on oeis.org

1, 2, 4, 6, 10, 16, 22, 32, 42, 58, 80, 102, 134, 176, 218, 276, 334, 414, 516, 618, 752, 886, 1062, 1280, 1498, 1774, 2108, 2442, 2856, 3270, 3786, 4404, 5022, 5774, 6660, 7546, 8608, 9670, 10950, 12448, 13946, 15720, 17494, 19602, 22044, 24486, 27342
Offset: 0

Views

Author

T. D. Noe, Jul 23 2007

Keywords

Comments

Same recursion as A006336, but different initial condition.

Programs

  • Mathematica
    a[0]=1; a[n_] := a[n] = a[n-1] + a[Floor[n/GoldenRatio]]; Table[a[n], {n,0,100}]

A060729 a(n+1) = a(n) + a(n minus the number of terms of the same parity as n so far).

Original entry on oeis.org

1, 2, 3, 4, 6, 9, 12, 16, 19, 25, 31, 37, 49, 55, 74, 83, 108, 120, 145, 161, 198, 217, 266, 291, 346, 377, 451, 482, 565, 602, 710, 765, 885, 940, 1085, 1159, 1357, 1431, 1697, 1771, 2117, 2191, 2642, 2725, 3207, 3290, 3855, 3963, 4673, 4781
Offset: 1

Views

Author

Robert G. Wilson v, Apr 22 2001

Keywords

Examples

			a(5) = a(4) + a(4 - the number of even terms so far) = a(4) + a(4-2) = 4 + 2 = 6.
		

Crossrefs

Programs

  • Mathematica
    a[ 1 ] = 1; a[ 2 ] = 2; a[ n_ ] := a[ n ] = Block[ {e = 0}, Do[ If[ EvenQ[ a[ k ] ], e++ ], {k, 1, n - 1} ]; If[ OddQ[ n ], a[ n - 1 ] + a[ n - 1 - e ], a[ n - 1 ] + a[ e ] ] ]; Table[ a[ n ], {n, 1, 50} ]

A060714 a(n) = a(n-1) + a(n-1 minus the number of terms of the same parity as n so far).

Original entry on oeis.org

1, 2, 3, 5, 6, 9, 11, 17, 19, 30, 33, 50, 55, 74, 80, 99, 108, 138, 155, 188, 207, 257, 276, 331, 361, 441, 471, 579, 609, 764, 797, 985, 1018, 1225, 1275, 1551, 1601, 1962, 2017, 2458, 2532, 2973, 3053, 3632, 3731, 4340, 4448, 5057, 5195, 5992
Offset: 1

Views

Author

Robert G. Wilson v, Apr 21 2001

Keywords

Examples

			a(5) = a(4) + a(4 - the number of odd terms so far) = a(4) + a(4-3) = 5 + 1 = 6.
		

Crossrefs

Programs

  • Mathematica
    a[ 1 ] = 1; a[ 2 ] = 2; a[ n_ ] := a[ n ] = Block[ {e = 0}, Do[ If[ EvenQ[ a[ k ] ], e++ ], {k, 1, n - 1} ]; If[ EvenQ[ n ], a[ n - 1 ] + a[ n - 1 - e ], a[ n - 1 ] + a[ e ] ] ]; Table[ a[ n ], {n, 1, 15} ]
Previous Showing 21-25 of 25 results.