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.

Showing 1-10 of 13 results. Next

A003056 n appears n+1 times. Also the array A(n,k) = n+k (n >= 0, k >= 0) read by antidiagonals. Also inverse of triangular numbers.

Original entry on oeis.org

0, 1, 1, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12
Offset: 0

Views

Author

Keywords

Comments

Also triangle read by rows: T(n,k), n>=0, k>=0, in which n appears n+1 times in row n. - Omar E. Pol, Jul 15 2012
The PARI functions t1, t2 can be used to read a triangular array T(n,k) (n >= 0, 0 <= k <= n-1) by rows from left to right: n -> T(t1(n), t2(n)). - Michael Somos, Aug 23 2002
Number of terms in partition of n with greatest number of distinct terms. - Amarnath Murthy, May 20 2001
Summation table for (x+y) = (0+0),(0+1),(1+0),(0+2),(1+1),(2+0), ...
Also the number of triangular numbers less than or equal to n, not counting 0 as triangular. - Robert G. Wilson v, Oct 21 2005
Permutation of A116939: a(n) = A116939(A116941(n)), a(A116942(n)) = A116939(n). - Reinhard Zumkeller, Feb 27 2006
Maximal size of partitions of n into distinct parts, see A000009. - Reinhard Zumkeller, Jun 13 2009
Also number of digits of A000462(n). - Reinhard Zumkeller, Mar 27 2011
Also the maximum number of 1's contained in the list of hook-lengths of a partition of n. E.g., a(4)=2 because hooks of partitions of n=4 comprise {4,3,2,1}, {4,2,1,1}, {3,2,2,1}, {4,1,2,1}, {4,3,2,1} where the number of 1's in each is 1,2,1,2,1. Hence the maximum is 2. - T. Amdeberhan, Jun 03 2012
Fan, Yang, and Yu (2012) prove a conjecture of Amdeberhan on the generating function of a(n). - Jonathan Sondow, Dec 17 2012
Also the number of partitions of n into distinct parts p such that max(p) - min(p) <= length(p). - Clark Kimberling, Apr 18 2014
Also the maximum number of occurrences of any single value among the previous terms. - Ivan Neretin, Sep 20 2015
Where records occur gives A000217. - Omar E. Pol, Nov 05 2015
Also number of peaks in the largest Dyck path of the symmetric representation of sigma(n), n >= 1. Cf. A237593. - Omar E. Pol, Dec 19 2016

Examples

			G.f. = x + x^2 + 2*x^3 + 2*x^4 + 2*x^5 + 3*x^6 + 3*x^7 + 3*x^8 + 3*x^9 + 4*x^10 + ...
As triangle, the sequence starts
  0;
  1, 1;
  2, 2, 2;
  3, 3, 3, 3;
  4, 4, 4, 4, 4;
  5, 5, 5, 5, 5, 5;
  6, 6, 6, 6, 6, 6, 6;
  7, 7, 7, 7, 7, 7, 7, 7;
  8, 8, 8, 8, 8, 8, 8, 8, 8;
  ...
		

Crossrefs

a(n) = A002024(n+1)-1.
Cf. A000196, A000217, A000462, A001227, A001462, A001614, A004247 (multiplication table), A006463 (partial sums), A016655, A050600, A050602, A048645, A122797, A131507, A238005.
Partial sums of A073424.

Programs

  • Haskell
    a003056 = floor . (/ 2) . (subtract 1) .
                      sqrt . (+ 1) . (* 8) . fromIntegral
    a003056_row n = replicate (n + 1) n
    a003056_tabl = map a003056_row [0..]
    a003056_list = concat $ a003056_tabl
    -- Reinhard Zumkeller, Aug 02 2014, Oct 17 2010
    
  • Magma
    [Floor((Sqrt(1+8*n)-1)/2): n in [0..80]]; // Vincenzo Librandi, Oct 23 2011
    
  • Maple
    A003056 := (n,k) -> n: # Peter Luschny, Oct 29 2011
    a := [ 0 ]: for i from 1 to 15 do for j from 1 to i+1 do a := [ op(a),i ]; od: od: a;
    A003056 := proc(n)
        floor((sqrt(1+8*n)-1)/2) ;
    end proc: # R. J. Mathar, Jul 10 2015
  • Mathematica
    f[n_] := Floor[(Sqrt[1 + 8n] - 1)/2]; Table[ f[n], {n, 0, 87}] (* Robert G. Wilson v, Oct 21 2005 *)
    Table[x, {x, 0, 13}, {y, 0, x}] // Flatten
    T[ n_, k_] := If[ n >= k >= 0, n, 0]; (* Michael Somos, Dec 22 2016 *)
    Flatten[Table[PadRight[{},n+1,n],{n,0,12}]] (* Harvey P. Dale, Jul 03 2021 *)
  • PARI
    A003056(n)=(sqrtint(8*n+1)-1)\2  \\ M. F. Hasler, Oct 08 2011
    
  • PARI
    t1(n)=floor(-1/2+sqrt(2+2*n)) /* A003056 */
    
  • PARI
    t2(n)=n-binomial(floor(1/2+sqrt(2+2*n)),2) /* A002262 */
    
  • Python
    from math import isqrt
    def A003056(n): return (k:=isqrt(m:=n+1<<1))+int((m<<2)>(k<<2)*(k+1)+1)-1 # Chai Wah Wu, Jul 26 2022

Formula

a(n) = floor((sqrt(1+8*n)-1)/2). - Antti Karttunen
a(n) = floor(-1/2 + sqrt(2*n+b)) with 1/4 <= b < 9/4 or a(n) = floor((sqrt(8*n+b)-1)/2) with 1 <= b < 9. - Michael A. Childers (childers_moof(AT)yahoo.com), Nov 11 2001
a(n) = f(n,0) with f(n,k) = k if n <= k, otherwise f(n-k-1, k+1). - Reinhard Zumkeller, May 23 2009
a(n) = 2*n + 1 - A001614(n+1) = n + 1 - A122797(n+1). - Reinhard Zumkeller, Feb 12 2012
a(n) = k if k*(k+1)/2 <= n < (k+1)*(k+2)/2. - Jonathan Sondow, Dec 17 2012
G.f.: (1-x)^(-1)*Sum_{n>=1} x^(n*(n+1)/2) = (Theta_2(0,x^(1/2)) - 2*x^(1/8))/(2*x^(1/8)*(1-x)) where Theta_2 is a Jacobi Theta function. - Robert Israel, May 21 2015
a(n) = floor((A000196(1+8*n)-1)/2). - Pontus von Brömssen, Dec 10 2018
a(n+1) = a(n-a(n)) + 1, a(0) = 0. - Rok Cestnik, Dec 29 2020
a(n) = A001227(n) + A238005(n), n >= 1. - Omar E. Pol, Sep 30 2021
Sum_{n>=1} (-1)^(n+1)/a(n) = log(2)/2 (cf. A016655). - Amiram Eldar, Sep 24 2023
G.f. as array: (x + y - 2*x*y)/((1 - x)^2*(1 - y)^2). - Stefano Spezia, Dec 20 2023 [corrected by Stefano Spezia, Apr 22 2024]

Extensions

Definition clarified by N. J. A. Sloane, Dec 08 2020

A001614 Connell sequence: 1 odd, 2 even, 3 odd, ...

Original entry on oeis.org

1, 2, 4, 5, 7, 9, 10, 12, 14, 16, 17, 19, 21, 23, 25, 26, 28, 30, 32, 34, 36, 37, 39, 41, 43, 45, 47, 49, 50, 52, 54, 56, 58, 60, 62, 64, 65, 67, 69, 71, 73, 75, 77, 79, 81, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 101, 103, 105, 107, 109, 111, 113, 115, 117, 119, 121, 122
Offset: 1

Views

Author

Keywords

Comments

Next (2n-1) odd numbers alternating with next 2n even numbers. Squares (A000290(n)) occur at the A000217(n)-th entry. - Lekraj Beedassy, Aug 06 2004. - Comment corrected by Daniel Forgues, Jul 18 2009
a(t_n) = a(n(n+1)/2) = n^2 relates squares to triangular numbers. - Daniel Forgues
The natural numbers not included are A118011(n) = 4n - a(n) as n=1,2,3,... - Paul D. Hanna, Apr 10 2006
As a triangle with row sums = A069778 (1, 6, 21, 52, 105, ...): /Q 1;/Q 2, 4;/Q 5, 7, 9;/Q 10, 12, 14, 16;/Q ... . - Gary W. Adamson, Sep 01 2008
The triangle sums, see A180662 for their definitions, link the Connell sequence A001614 as a triangle with six sequences, see the crossrefs. - Johannes W. Meijer, May 20 2011
a(n) = A122797(n) + n - 1. - Reinhard Zumkeller, Feb 12 2012

Examples

			From _Omar E. Pol_, Aug 13 2013: (Start)
Written as a triangle the sequence begins:
   1;
   2,  4;
   5,  7,  9;
  10, 12, 14, 16;
  17, 19, 21, 23, 25;
  26, 28, 30, 32, 34, 36;
  37, 39, 41, 43, 45, 47, 49;
  50, 52, 54, 56, 58, 60, 62, 64;
  65, 67, 69, 71, 73, 75, 77, 79, 81;
  82, 84, 86, 88, 90, 92, 94, 96, 98, 100;
  ...
Right border gives A000290, n >= 1.
(End)
		

References

  • C. Pickover, Computers and the Imagination, St. Martin's Press, NY, 1991, p. 276.
  • C. A. Pickover, The Mathematics of Oz, Chapter 39, Camb. Univ. Press UK 2002.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A117384, A118011 (complement), A118012.
Cf. A069778. - Gary W. Adamson, Sep 01 2008
From Johannes W. Meijer, May 20 2011: (Start)
Triangle columns: A002522, A117950 (n>=1), A117951 (n>=2), A117619 (n>=3), A154533 (n>=5), A000290 (n>=1), A008865 (n>=2), A028347 (n>=3), A028878 (n>=1), A028884 (n>=2), A054569 [T(2*n,n)].
Triangle sums (see the comments): A069778 (Row1), A190716 (Row2), A058187 (Related to Kn11, Kn12, Kn13, Kn21, Kn22, Kn23, Fi1, Fi2, Ze1 and Ze2), A000292 (Related to Kn3, Kn4, Ca3, Ca4, Gi3 and Gi4), A190717 (Related to Ca1, Ca2, Ze3, Ze4), A190718 (Related to Gi1 and Gi2). (End)

Programs

  • Haskell
    a001614 n = a001614_list !! (n-1)
    a001614_list = f 0 0 a057211_list where
       f c z (x:xs) = z' : f x z' xs where z' = z + 1 + 0 ^ abs (x - c)
    -- Reinhard Zumkeller, Dec 30 2011
    
  • Magma
    [2*n-Round(Sqrt(2*n)): n in [1..80]]; // Vincenzo Librandi, Apr 17 2015
    
  • Maple
    A001614:=proc(n): 2*n - floor((1+sqrt(8*n-7))/2) end: seq(A001614(n),n=1..67); # Johannes W. Meijer, May 20 2011
  • Mathematica
    lst={};i=0;For[j=1, j<=4!, a=i+1;b=j;k=0;For[i=a, i<=9!, k++;AppendTo[lst, i];If[k>=b, Break[]];i=i+2];j++ ];lst (* Vladimir Joseph Stephan Orlovsky, Aug 29 2008 *)
    row[n_] := 2*Range[n+1]+n^2-1; Table[row[n], {n, 0, 11}] // Flatten (* Jean-François Alcover, Oct 25 2013 *)
  • PARI
    a(n)=2*n - round(sqrt(2*n)) \\ Charles R Greathouse IV, Apr 20 2015
    
  • Python
    from math import isqrt
    def A001614(n): return (m:=n<<1)-(k:=isqrt(m))-int((m<<2)>(k<<2)*(k+1)+1) # Chai Wah Wu, Jul 26 2022

Formula

a(n) = 2*n - floor( (1+ sqrt(8*n-7))/2 ).
a(n) = A005843(n) - A002024(n). - Lekraj Beedassy, Aug 06 2004
a(n) = A118012(A118011(n)). A117384( a(n) ) = n; A117384( 4*n - a(n) ) = n. - Paul D. Hanna, Apr 10 2006
a(1) = 1; then a(n) = a(n-1)+1 if a(n-1) is a square, a(n) = a(n-1)+2 otherwise. For example, a(21)=36 is a square therefore a(22)=36+1=37 which is not a square so a(23)=37+2=39 ... - Benoit Cloitre, Feb 07 2007
T(n,k) = (n-1)^2 + 2*k - 1. - Omar E. Pol, Aug 13 2013
a(n)^2 = a(n*(n+1)/2). - Ivan N. Ianakiev, Aug 15 2013
Let the sequence be written in the form of the triangle in the EXAMPLE section below and let a(n) and a(n+1) belong to the same row of the triangle. Then a(n)*a(n+1) + 1 = a(A000217(A118011(n))) = A000290(A118011(n)). - Ivan N. Ianakiev, Aug 16 2013
a(n) = 2*n-round(sqrt(2*n)). - Gerald Hillier, Apr 15 2015
From Robert Israel, Apr 20 2015 (Start):
G.f.: 2*x/(1-x)^2 - (x/(1-x))*Sum_{n>=0} x^(n*(n+1)/2) = 2*x/(1-x)^2 - (Theta2(0,x^(1/2)))*x^(7/8)/(2*(1-x)) where Theta2 is a Jacobi theta function.
a(n) = 2*n-1 - Sum_{i=0..n-2} A023531(i). (End)
a(n) = 3*n-A014132(n). - Chai Wah Wu, Oct 19 2024

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), Mar 16 2001

A122793 Connell sum sequence (partial sums of the Connell sequence).

Original entry on oeis.org

1, 3, 7, 12, 19, 28, 38, 50, 64, 80, 97, 116, 137, 160, 185, 211, 239, 269, 301, 335, 371, 408, 447, 488, 531, 576, 623, 672, 722, 774, 828, 884, 942, 1002, 1064, 1128, 1193, 1260, 1329, 1400, 1473, 1548, 1625, 1704, 1785, 1867, 1951, 2037, 2125, 2215, 2307, 2401, 2497, 2595, 2695, 2796, 2899, 3004, 3111, 3220
Offset: 1

Views

Author

Grady Bullington (bullingt(AT)uwosh.edu), Sep 14 2006

Keywords

Comments

a(n) is the sum of the n highest entries in the projection of the n-th tetrahedron or tetrahedral number (e.g., a(7) = 7+6+6+5+5+5+4+4).
a(n) is a sharp upper bound for the value of a gamma-labeling of a graph with n edges (cf. Bullington).

Crossrefs

Cf. A337300 (geometric Connell sums).

Programs

  • Python
    from math import isqrt
    def A122793(n): return n*(n+1)-(r:=(k:=isqrt(m:=n<<1))+int((m<<2)>(k<<2)*(k+1)+1))*((6*n+1)-r**2)//6 # Chai Wah Wu, Jul 26 2022

Formula

a(n) = (n-th triangular number) - n + (n-th partial sum of A122797).
a(n) = n^2 + n - R*((6*n+1)-R^2)/6, where R = round(sqrt(2*n)). - Gerald Hillier, Nov 29 2009

A122798 A P_5-stuttered arithmetic progression with a(n+1) = a(n) if n is a pentagonal number, a(n+1) = a(n)+4 otherwise.

Original entry on oeis.org

1, 1, 5, 9, 13, 13, 17, 21, 25, 29, 33, 37, 37, 41, 45, 49, 53, 57, 61, 65, 69, 73, 73, 77, 81, 85, 89, 93, 97, 101, 105, 109, 113, 117, 121, 121, 125, 129, 133, 137, 141, 145, 149, 153, 157, 161, 165, 169, 173, 177, 181, 181, 185, 189, 193, 197, 201, 205, 209
Offset: 1

Views

Author

Grady Bullington (bullingt(AT)uwosh.edu), Sep 14 2006

Keywords

Comments

P_5(i) = the i-th pentagonal number.

Crossrefs

Programs

  • Mathematica
    nxt[{n_,a_}]:={n+1,If[IntegerQ[(1+Sqrt[24n+25])/6],a,a+4]}; Join[{1}, Transpose[ NestList[nxt,{1,1},60]][[2]]] (* Harvey P. Dale, May 07 2015 *)
    nxt[{n_,a_}]:=With[{pn=PolygonalNumber[5,Range[0,30]]},{n+1,If[MemberQ[pn,n],a,a+4]}]; NestList[nxt,{1,1},100][[;;,2]] (* Harvey P. Dale, Sep 28 2023 *)
  • PARI
    lista(m) = {aa = 1; for (i=1, m, print1(aa, ", "); if (! ispolygonal(i, 5), aa += 4););} \\ Michel Marcus, Apr 01 2013, May 02 2015

Formula

a(n) = A045929(n) - n + 1.

Extensions

Definition corrected by Michel Marcus, Apr 01 2013

A122800 A P_4-stuttered arithmetic progression with a(n+1)=a(n) if n is square, a(n+1)=a(n)+2 otherwise.

Original entry on oeis.org

1, 1, 3, 5, 5, 7, 9, 11, 13, 13, 15, 17, 19, 21, 23, 25, 25, 27, 29, 31, 33, 35, 37, 39, 41, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 85, 87, 89, 91, 93, 95, 97, 99, 101, 103, 105, 107, 109, 111, 113, 113, 115, 117, 119, 121, 123, 125, 127, 129, 131, 133, 135, 137, 139, 141, 143, 145, 145, 147, 149, 151, 153, 155, 157, 159, 161, 163, 165, 167, 169, 171, 173, 175, 177, 179, 181
Offset: 1

Views

Author

Grady Bullington (bullingt(AT)uwosh.edu), Sep 14 2006

Keywords

Comments

P_4(i) = the i-th square.

Crossrefs

Programs

  • Mathematica
    nxt[{n_,a_}]:={n+1,If[IntegerQ[Sqrt[n+1]],a,a+2]}; NestList[nxt,{0,1},100][[All,2]] (* Harvey P. Dale, Jan 01 2020 *)
  • PARI
    lista(m) = {aa = 1; for (i=1, m, print1(aa, ", "); if (! issquare(i), aa = aa + 2););} \\ Michel Marcus, Apr 01 2013

Formula

a(n) = A045928(n)-n+1.

A122794 Connell (3,2)-sum sequence (partial sums of the (3,2)-Connell sequence).

Original entry on oeis.org

1, 3, 8, 16, 25, 37, 52, 70, 91, 113, 138, 166, 197, 231, 268, 308, 349, 393, 440, 490, 543, 599, 658, 720, 785, 851, 920, 992, 1067, 1145, 1226, 1310, 1397, 1487, 1580, 1676, 1773, 1873, 1976, 2082, 2191, 2303, 2418, 2536, 2657, 2781, 2908, 3038, 3171, 3305, 3442, 3582, 3725, 3871, 4020, 4172, 4327, 4485, 4646, 4810, 4977, 5147, 5320, 5496, 5673, 5853, 6036, 6222, 6411, 6603
Offset: 1

Views

Author

Grady Bullington (bullingt(AT)uwosh.edu), Sep 14 2006

Keywords

Crossrefs

Formula

a(n) = (n-th triangular number)-n+(n-th partial sum of A122800).

A122795 Connell (5,3)-sum sequence (partial sums of the (5,3)-Connell sequence).

Original entry on oeis.org

1, 3, 10, 22, 39, 57, 80, 108, 141, 179, 222, 270, 319, 373, 432, 496, 565, 639, 718, 802, 891, 985, 1080, 1180, 1285, 1395, 1510, 1630, 1755, 1885, 2020, 2160, 2305, 2455, 2610, 2766, 2927, 3093, 3264, 3440, 3621, 3807, 3998, 4194, 4395, 4601, 4812, 5028, 5249, 5475, 5706, 5938, 6175, 6417, 6664, 6916, 7173, 7435, 7702, 7974, 8251, 8533, 8820, 9112, 9409, 9711, 10018, 10330, 10647, 10969
Offset: 1

Views

Author

Grady Bullington (bullingt(AT)uwosh.edu), Sep 14 2006

Keywords

Crossrefs

Formula

a(n) = (n-th triangular number)-n+(n-th partial sum of A122798).

A122796 Connell (3,5)-sum sequence (partial sums of the (3,5)-Connell sequence).

Original entry on oeis.org

1, 3, 8, 16, 27, 41, 58, 76, 97, 121, 148, 178, 211, 247, 286, 328, 373, 421, 470, 522, 577, 635, 696, 760, 827, 897, 970, 1046, 1125, 1207, 1292, 1380, 1471, 1565, 1660, 1758, 1859, 1963, 2070, 2180, 2293, 2409, 2528, 2650, 2775, 2903, 3034, 3168, 3305, 3445, 3588, 3734, 3883, 4035, 4190, 4346, 4505, 4667, 4832, 5000, 5171, 5345, 5522, 5702, 5885, 6071, 6260, 6452, 6647, 6845
Offset: 1

Views

Author

Grady Bullington (bullingt(AT)uwosh.edu), Sep 14 2006

Keywords

Crossrefs

Formula

a(n) = (n-th triangular number)-n+(n-th partial sum of A122799).

A122799 A P_7-stuttered arithmetic progression with a(n+1)=a(n) if n is not a heptagonal number, a(n+1)=a(n)+2 otherwise.

Original entry on oeis.org

1, 1, 3, 5, 7, 9, 11, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95, 97, 99, 101, 101, 103, 105, 107, 109, 111, 113, 115, 117, 119, 121, 123, 125, 127, 129, 131, 133, 135, 137, 139, 141, 143, 145, 147, 149, 151, 151, 153, 155, 157, 159, 161, 163, 165, 167, 169, 171, 173, 175, 177, 179, 181, 183, 185, 187
Offset: 1

Views

Author

Grady Bullington (bullingt(AT)uwosh.edu), Sep 14 2006

Keywords

Comments

P_7(i) = the i-th heptagonal number.

Crossrefs

Programs

  • PARI
    isHeptag(n) = {if (! issquare(40*n+9, &res), return (0)); if ((res + 3) % 10, return (0), return (1));}
    lista(m) = {aa = 1; for (i=1, m, print1(aa, ", "); if (! isHeptag(i), aa += 2););} \\ Michel Marcus, Apr 01 2013

Formula

a(n) = A045930(n)-n+1.

Extensions

Definition corrected by Michel Marcus, Apr 01 2013

A096824 a(n) = n for n <= 2; for n > 2, a(n) = 2a(n-1) - a(n - floor(1/2 + sqrt(2(n-1)))).

Original entry on oeis.org

0, 1, 2, 3, 4, 6, 9, 14, 24, 42, 75, 136, 258, 492, 942, 1809, 3482, 6828, 13398, 26304, 51666, 101523, 199564, 395646, 784464, 1555530, 3084756, 6117846, 12134169, 24068774, 47937984, 95480322, 190176180, 378796830, 754508904, 1502899962
Offset: 0

Views

Author

N. J. A. Sloane, Aug 17 2004

Keywords

Crossrefs

Programs

  • Haskell
    a096824 n = a096824_list !! n
    a096824_list = 0 : 1 : 2 : zipWith (-)
       (map (* 2) $ drop 2 a096824_list) (map a096824 $ tail a122797_list)
    -- Reinhard Zumkeller, Feb 12 2012
  • Mathematica
    a[n_] := a[n] = If[n < 3, a[n] = n, 2a[n - 1] - a[n - Floor[1/2 + Sqrt[2(n - 1)]]]]; Table[ a[n], {n, 0, 35}] (* Robert G. Wilson v, Aug 20 2004 *)
  • PARI
    {m=36;v=vector(m+1);for(n=0,m,if(n<=2,a=n,k=n-floor(1/2+sqrt(2*(n-1)));a=2*v[n]-v[k+1]);v[n+1]=a;print1(a,","))} \\ Klaus Brockhaus, Aug 20 2004
    

Extensions

More terms from Klaus Brockhaus and Robert G. Wilson v, Aug 20 2004
Showing 1-10 of 13 results. Next