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 284 results. Next

A007401 Add n-1 to n-th term of 'n appears n times' sequence (A002024).

Original entry on oeis.org

1, 3, 4, 6, 7, 8, 10, 11, 12, 13, 15, 16, 17, 18, 19, 21, 22, 23, 24, 25, 26, 28, 29, 30, 31, 32, 33, 34, 36, 37, 38, 39, 40, 41, 42, 43, 45, 46, 47, 48, 49, 50, 51, 52, 53, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76
Offset: 1

Views

Author

Keywords

Comments

Complement of A000096 = increasing sequence of positive integers excluding n*(n+3)/2. - Jonathan Vos Post, Aug 13 2005
As a triangle: (1; 3,4; 6,7,8; 10,11,12,13; ...), Row sums = A127736: (1, 7, 21, 46, 85, 141, 217, ...). - Gary W. Adamson, Oct 25 2007
Odd primes are a subsequence except 5, cf. A004139. - Reinhard Zumkeller, Jul 18 2011
A023532(a(n)) = 1. - Reinhard Zumkeller, Dec 04 2012
T(n,k) = ((n+k)^2+n-k)/2 - 1, n,k > 0, read by antidiagonals. - Boris Putievskiy, Jan 14 2013
A023531(a(n)) = 0. - Reinhard Zumkeller, Feb 14 2015

Examples

			From _Boris Putievskiy_, Jan 14 2013: (Start)
The start of the sequence as table:
   1,  3,  6, 10, 15, 21, 28, ...
   4,  7, 11, 16, 22, 29, 37, ...
   8, 12, 17, 23, 30, 38, 47, ...
  13, 18, 24, 31, 39, 48, 58, ...
  19, 25, 32, 40, 49, 59, 70, ...
  26, 33, 41, 50, 60, 71, 83, ...
  34, 42, 51, 61, 72, 84, 97, ...
  ...
The start of the sequence as triangle array read by rows:
   1;
   3,  4;
   6,  7,  8;
  10, 11, 12, 13;
  15, 16, 17, 18, 19;
  21, 22, 23, 24, 25, 26;
  28, 29, 30, 31, 32, 33, 34;
  ...
Row number r contains r numbers r*(r+1)/2, r*(r+1)/2+1, ..., r*(r+1)/2+r-1. (End)
		

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Haskell
    a007401 n = a007401_list !! n
    a007701_list = [x | x <- [0..], a023531 x == 0]
    -- Reinhard Zumkeller, Feb 14 2015, Dec 04 2012
    
  • Mathematica
    f[n_] := n + Floor[ Sqrt[2n] - 1/2]; Array[f, 66]; (* Robert G. Wilson v, Feb 13 2011 *)
  • PARI
    a(n)=n+floor(sqrt(n+n)-1/2) \\ Charles R Greathouse IV, Feb 13 2011
    
  • PARI
    for(m=1,9, for(n=m*(m+1)/2,(m^2+3*m-2)/2, print1(n", "))) \\ Charles R Greathouse IV, Feb 13 2011
    
  • Python
    from math import isqrt
    def A007401(n): return n-1+(isqrt(n<<3)+1>>1) # Chai Wah Wu, Oct 18 2022

Formula

From Boris Putievskiy, Jan 14 2013: (Start)
a(n) = A014132(n) - 1.
a(n) = A003057(n)^2 - A114327(n) - 1.
a(n) = ((t+2)^2 + i - j)/2-1, where
i = n-t*(t+1)/2,
j = (t*t+3*t+4)/2-n,
t = floor((-1+sqrt(8*n-7))/2). (End)

A060432 Partial sums of A002024.

Original entry on oeis.org

1, 3, 5, 8, 11, 14, 18, 22, 26, 30, 35, 40, 45, 50, 55, 61, 67, 73, 79, 85, 91, 98, 105, 112, 119, 126, 133, 140, 148, 156, 164, 172, 180, 188, 196, 204, 213, 222, 231, 240, 249, 258, 267, 276, 285, 295, 305, 315, 325, 335, 345, 355, 365, 375, 385, 396, 407, 418
Offset: 1

Views

Author

Robert A. Stump (bobess(AT)netzero.net), Apr 06 2001

Keywords

Comments

In other words, first differences give A002024.
Equals A010054 convolved with [1, 2, 3, ...]. - Gary W. Adamson, Mar 16 2010

Examples

			a(7) = 1 + 2 + 2 + 3 + 3 + 3 + 4 = 18.
		

Crossrefs

Programs

  • Haskell
    a060432 n = sum $ zipWith (*) [n,n-1..1] a010054_list
    -- Reinhard Zumkeller, Dec 17 2011
    
  • Maple
    ListTools:-PartialSums([seq(n$n,n=1..10)]); # Robert Israel, Jan 28 2016
  • Mathematica
    a[n_] := Sum[Floor[1/2 + Sqrt[2*k]], {k, 1, n}]; Array[a, 60] (* Jean-François Alcover, Jan 10 2016 *)
    Accumulate[Table[PadRight[{},n,n],{n,15}]//Flatten] (* Harvey P. Dale, May 24 2025 *)
  • PARI
    f(n) = floor(1/2+sqrt(2*n))
    for(n=1,100,print1(sum(k=1,n,f(k)),","))
    
  • PARI
    { default(realprecision, 100); for (n=1, 1000, a=sum(k=1, n, floor(1/2 + sqrt(2*k))); write("b060432.txt", n, " ", a); ) } \\ Harry J. Smith, Jul 05 2009
    
  • Python
    from math import isqrt
    def A060432(n): return (k:=(r:=isqrt(m:=n+1<<1))+int((m<<2)>(r<<2)*(r+1)+1)-1)*(k*(-k - 3) + 6*n - 2)//6 + n # Chai Wah Wu, Oct 16 2022

Formula

Let f(n) = floor(1/2 + sqrt(2*n)), then this function is S(n) = f(1) + f(2) + f(3) + ... + f(n).
a(n) is asymptotic to c*n^(3/2) with c=0.9428.... - Benoit Cloitre, Dec 18 2002
a(n) is asymptotic to c*n^(3/2) with c = (2/3)*sqrt(2) = .942809.... - Franklin T. Adams-Watters, Sep 07 2006
Set R = round(sqrt(2*n)), then a(n) = ((6*n+1)*R-R^3)/6. - Gerald Hillier, Nov 28 2008
G.f.: W(0)/(2*(1-x)^2), where W(k) = 1 + 1/( 1 - x^(k+1)/( x^(k+1) + 1/W(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Aug 21 2013
a(n) = A000330(A003056(n)) + (A003056(n) + 1) * (n - A057944(n)). This represents a closed form, because all of the constituent sequences (i.e., A003056, A000330, A057944) have a known closed form. - Peter Kagey, Jan 28 2016
G.f.: x^(7/8)*Theta_2(0,x^(1/2))/(2*(1-x)^2) where Theta_2 is a Jacobi theta function. - Robert Israel, Jan 28 2016
G.f.: (x/(1 - x)^2)*Product_{k>=1} (1 - x^(2*k))/(1 - x^(2*k-1)). - Ilya Gutkovskiy, May 30 2017
a(n) = n*(k+1)-k*(k+1)*(k+2)/6 where k = A003056(n) is the largest integer such that k*(k+1)/2 <= n. - Bogdan Blaga, Feb 04 2021

Extensions

More terms from Jason Earls, Jan 08 2002

A005230 Stern's sequence: a(1) = 1, a(n+1) is the sum of the m preceding terms, where m*(m-1)/2 < n <= m*(m+1)/2 or equivalently m = ceiling((sqrt(8*n+1)-1)/2) = A002024(n).

Original entry on oeis.org

1, 1, 2, 3, 6, 11, 20, 40, 77, 148, 285, 570, 1120, 2200, 4323, 8498, 16996, 33707, 66844, 132568, 262936, 521549, 1043098, 2077698, 4138400, 8243093, 16419342, 32706116, 65149296, 130298592, 260075635, 519108172, 1036138646, 2068138892, 4128034691
Offset: 1

Views

Author

Keywords

Comments

A002487 is THE Stern's sequence!
Limit_{n->oo} a(n)/2^n = 0.11756264240558743281779408719593950494049225979176... - Jon E. Schoenfield, Dec 17 2016

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A002487.

Programs

  • Maple
    A005230[1] := 1: n := 50: for k from 1 to n-1 do: A005230[k+1] := sum('A005230[j]','j'=k+1-(ceil((sqrt(8*k+1)-1)/2))..k): od: [seq(A005230[k],k=1..n)]; # UlrSchimke(AT)aol.com, Mar 16 2002
  • Mathematica
    Module[{lst={1,1},n=2},While[n<40,AppendTo[lst,Total[ Take[lst, -Ceiling[ (Sqrt[8n+1]-1)/2]]]];n++];lst] (* Harvey P. Dale, Apr 02 2012 *)
  • PARI
    a(n)=if(n==1,1,sum(k=1,ceil((sqrt(8*n-7)-1)/2),a(n-k))) \\ Paul D. Hanna, Aug 28 2006
    
  • PARI
    v=vector(10^3);v[1]=v[2]=1;v[3]=2;v[4]=3;u=vector(#v,i,if(i>4,0,sum(j=1,i,v[j])));for(i=5,#v,m=ceil((sqrt(8*i-7)-1)/2);v[i]=u[i-1]-u[i-m-1];u[i]=u[i-1]+v[i]);u=0;v \\ Charles R Greathouse IV, Sep 19 2011
    
  • Python
    from itertools import count, islice
    from math import isqrt
    def A005230_gen(): # generator of terms
        blist = [1]
        for n in count(1):
            yield blist[-1]
            blist.append(sum(blist[-i] for i in range(1,(isqrt(8*n)+3)//2)))
    A005230_list = list(islice(A005230_gen(),30)) # Chai Wah Wu, Feb 02 2022

Formula

Partial sums give Conway-Guy sequence A005318. Cf. A066777.
2*a(n*(n+1)/2 + 1) = a(n*(n+1)/2 + 2) for n>=1; lim_{n->oo} a(n+1)/a(n) = 2. - Paul D. Hanna, Aug 28 2006

Extensions

Name corrected by Mario Szegedy, Sep 15 1996
Name revised by Ulrich Schimke (ulrschimke(AT)aol.com), Mar 16 2002

A169581 Positions in A002260(n) and A002024(n) when canonically enumerating A038566(n)/A038567(n), the positive rational numbers <= 1.

Original entry on oeis.org

1, 2, 4, 5, 7, 9, 11, 12, 13, 14, 16, 20, 22, 23, 24, 25, 26, 27, 29, 31, 33, 35, 37, 38, 40, 41, 43, 44, 46, 48, 52, 54, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 67, 71, 73, 77, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 92, 94, 96, 100, 102, 104, 106, 107, 109, 112, 113
Offset: 1

Views

Author

Reinhard Zumkeller, Dec 02 2009

Keywords

Comments

A038566(n) = A002260(a(n)); A038567(n) = A002024(a(n));
A054521(a(n)) = 1; complement of A169582.

A193039 G.f. A(x) satisfies: 1 = Sum_{n>=0} x^n*A(-x)^A002024(n+1), where A002024 is defined as "n appears n times.".

Original entry on oeis.org

1, 1, 1, 2, 5, 13, 34, 91, 251, 709, 2035, 5913, 17366, 51483, 153858, 463001, 1401751, 4266619, 13048709, 40078032, 123570957, 382331356, 1186699353, 3694028136, 11529606672, 36073811897, 113123222246, 355485228001, 1119275386080, 3530531671842
Offset: 0

Views

Author

Paul D. Hanna, Jul 14 2011

Keywords

Comments

Compare the g.f. to a g.f. C(x) of the Catalan numbers: 1 = Sum_{n>=0} x^n*C(-x)^(2*n+1).

Examples

			G.f.: A(x) = 1 + x + x^2 + 2*x^3 + 5*x^4 + 13*x^5 + 34*x^6 + 91*x^7 +...
The g.f. satisfies:
1 = A(-x) + x*A(-x)^2 + x^2*A(-x)^2 + x^3*A(-x)^3 + x^4*A(-x)^3 + x^5*A(-x)^3 + x^6*A(-x)^4 +...+ x^n*A(-x)^A002024(n+1) +...
where A002024 begins: [1,2,2,3,3,3,4,4,4,4,5,5,5,5,5,6,6,6,6,6,6,7,...].
The g.f. also satisfies:
1-x = (1-x)*A(-x) + x*(1-x^2)*A(-x)^2 + x^3*(1-x^3)*A(-x)^3 + x^6*(1-x^4)*A(-x)^4 + x^10*(1-x^5)*A(-x)^5 +...
		

Crossrefs

Programs

  • PARI
    {a(n)=local(A=[1]);for(i=1,n,A=concat(A,0);A[#A]=polcoeff(sum(m=1,#A,(-x)^m*Ser(A)^floor(sqrt(2*m)+1/2) ),#A));if(n<0,0,A[n+1])}

Formula

G.f. satisfies: 1-x = Sum_{n>=1} x^(n*(n-1)/2) * (1-x^n) * A(-x)^n.

A182630 T(n,k) = A002024(k+1)*n + A002262(k), n >= 0, k >= 0, read by antidiagonals.

Original entry on oeis.org

0, 1, 0, 2, 2, 1, 3, 4, 3, 0, 4, 6, 5, 3, 1, 5, 8, 7, 6, 4, 2, 6, 10, 9, 9, 7, 5, 0, 7, 12, 11, 12, 10, 8, 4, 1, 8, 14, 13, 15, 13, 11, 8, 5, 2, 9, 16, 15, 18, 16, 14, 12, 9, 6, 3, 10, 18, 17, 21, 19, 17, 16, 13, 10, 7, 0
Offset: 0

Views

Author

Omar E. Pol, Dec 06 2010

Keywords

Comments

A table of congruences.
See A182631 for another version.

Examples

			Table of congruences:
===============+====+=======+==========+=============+====
           mod |  1 |   2   |     3    |      4      | ...
===============+====+=======+==========+=============+====
  congruent to |  0 |  0  1 |  0  1  2 |  0  1  2  3 | ...
===============+====+=======+==========+=============+====
Array begins:  |  0 |  0  1 |  0  1  2 |  0  1  2  3 | ...
               |  1 |  2  3 |  3  4  5 |  4  5  6  7 | ...
               |  2 |  4  5 |  6  7  8 |  8  9 10 11 | ...
               |  3 |  6  7 |  9 10 11 | 12 13 14 15 | ...
               |  4 |  8  9 | 12 13 14 | 16 17 18 19 | ...
               |  5 | 10 11 | 15 16 17 | 20 21 22 23 | ...
               |  6 | 12 13 | 18 19 20 | 24 25 26 27 | ...
               |  7 | 14 15 | 21 22 23 | 28 29 30 31 | ...
               |  8 | 16 17 | 24 25 26 | 32 33 34 35 | ...
               |  9 | 18 19 | 27 28 29 | 36 37 38 39 | ...
               | 10 | 20 21 | 30 31 32 | 40 41 42 43 | ...
		

Crossrefs

Programs

A204248 Permanent of the n-th principal submatrix of A002024.

Original entry on oeis.org

1, 1, 7, 126, 4276, 234300, 18877020, 2100159600, 308417610816, 57786899446080, 13452134426136000, 3808606484711952000, 1288711254432792833280, 513583129024901529834240, 238093035025913233419052800, 127039392937347095305900800000, 77298350216325487808699492352000
Offset: 0

Views

Author

Clark Kimberling, Jan 14 2012

Keywords

Comments

a(n) is permanent of Toeplitz matrix
n n-1 n-2 ... 3 2 1
n+1 n n-1 ... 4 3 2
n+2 n+1 n ... 5 4 3
.......
2n-1 2n-2 2n-3 ... n+2 n+1 n. - Vladimir Shevelev, Dec 01 2013

Examples

			From _Vladimir Shevelev_, Dec 01 2013: (Start)
a(3) = permanent ( 3 2 1 ) = 3*17 + 2*22 + 1*31 = 126.
                 ( 4 3 2 )
                 ( 5 4 3 )
and
a(3) = |stirling1(3,3)*stirling1(4,1)|*6*1 + |stirling1(3,2)*stirling1(4,2)|*2*1 + |stirling1(3,1)*stirling1(4,3)|*1*2 = 1*6*6*1 + 3*11*2*1 + 2*6*1*2 = 126. (End)
		

Crossrefs

Programs

  • Mathematica
    f[i_, j_] := i + j - 1;
    m[n_] := Table[f[i, j], {i, 1, n}, {j, 1, n}]
    TableForm[m[8]] (* 8x8 principal submatrix *)
    Flatten[Table[f[i, n + 1 - i],
      {n, 1, 12}, {i, 1, n}]]  (* A002024 *)
    Join[{1},Table[Permanent[m[n]], {n, 1, 15}]]  (* A204248 *)
  • PARI
    a(n) = (-1)^n * sum(k=0, n-1, stirling(n, n-k) * stirling(n+1, k+1) * (n-k)! * k! ) /* Max Alekseyev, Dec 02 2013 */
    
  • Python
    from math import factorial
    from sympy.functions.combinatorial.numbers import stirling
    def A204248(n): return sum(stirling(n,n-k,kind=1)*stirling(n+1,k+1,kind=1)*factorial(n-k)*factorial(k) for k in range(n)) if n else 1 # Chai Wah Wu, Oct 16 2022
    
  • Python
    from math import factorial, comb
    from sympy.functions.combinatorial.numbers import stirling
    def A204248(n): return factorial(n)*stirling(m:=(n<<1)+1,n+1,kind=1)//comb(m,n) # Chai Wah Wu, Jun 08 2025

Formula

a(n) = (-1)^n * Sum_{k=0..n} Stirling1(n,n-k) * Stirling1(n+1,k+1) * (n-k)! * k!. - Vladimir Shevelev, Dec 01 2013
Limit n->infinity a(n)^(1/n)/n^2 = -2*c^2/(exp(2)*(1+2*c)) = 0.33230326707622..., where c = LambertW(-1,-1/(2*exp(1/2))) = -1.756431208626... - Vaclav Kotesovec, Dec 10 2013
a(n) ~ 2.531082868731093... * (-2*c^2/(exp(2)*(1+2*c)))^n * n^(2*n+1/2), where c = LambertW(-1,-1/(2*exp(1/2))). - Vaclav Kotesovec, Dec 10 2013
a(n) = n!*abs(Stirling1(2*n+1,n+1))/C(2*n+1,n). - Chai Wah Wu, Jun 08 2025

Extensions

More terms from Max Alekseyev, Dec 02 2013
a(0)=1 prepended by Pontus von Brömssen, Jan 30 2021

A217916 a(n) = prime(n) - Sum_{k=1..A002024(n)-1} a(n-k), where A002024(m) = [sqrt(2*m)+1/2] is "n appears n times".

Original entry on oeis.org

2, 1, 4, 2, 5, 6, 4, 4, 9, 12, 2, 10, 8, 11, 16, 6, 8, 12, 14, 15, 18, 6, 10, 14, 20, 18, 17, 22, 2, 10, 24, 18, 26, 20, 27, 24, 6, 8, 14, 30, 24, 28, 30, 29, 28, 2, 18, 20, 18, 32, 28, 34, 32, 39, 34, 6, 8, 20, 26, 22, 34, 38, 48, 36, 41, 38, 14, 12, 18, 22, 30
Offset: 1

Views

Author

Paul D. Hanna, Mar 04 2013

Keywords

Comments

Form this sequence into a number triangle, then it seems that:
(1) the odd numbers only appear adjacent to the main diagonal;
(2) the number 2 only appears in column 1.

Examples

			Start with a(1) = 2, from then on, the sum of A002024(n) consecutive terms prior to and including a(n) generates the n-th prime number
(A002024 begins: [1, 2,2, 3,3,3, 4,4,4,4, 5,5,5,5,5, ...]).
n=1: 2 = 2; (start)
n=2: 3 = 2 + 1; (sum of 2 terms = prime)
n=3: 5 = 1 + 4;     "
n=4: 7 = 1 + 4 + 2; (sum of 3 terms = prime)
n=5: 11 = 4 + 2 + 5;    "
n=6: 13 = 2 + 5 + 6;    "
n=7: 17 = 2 + 5 + 6 + 4; (sum of 4 terms = prime)
n=8: 19 = 5 + 6 + 4 + 4;    "
n=9: 23 = 6 + 4 + 4 + 9;    "
n=10: 29 = 4 + 4 + 9 + 12;    "
n=11: 31 = 4 + 4 + 9 + 12 + 2; (sum of 5 terms = prime)
...
As a triangle, the sequence begins:
2;
1, 4;
2, 5, 6;
4, 4, 9, 12;
2, 10, 8, 11, 16;
6, 8, 12, 14, 15, 18;
6, 10, 14, 20, 18, 17, 22;
2, 10, 24, 18, 26, 20, 27, 24;
6, 8, 14, 30, 24, 28, 30, 29, 28;
2, 18, 20, 18, 32, 28, 34, 32, 39, 34;
6, 8, 20, 26, 22, 34, 38, 48, 36, 41, 38;
14, 12, 18, 22, 30, 28, 42, 44, 54, 40, 47, 46;
4, 22, 22, 20, 32, 32, 34, 46, 50, 62, 44, 49, 50;
12, 12, 26, 30, 24, 38, 44, 36, 64, 56, 72, 50, 55, 52;
6, 22, 18, 32, 32, 30, 44, 48, 38, 76, 66, 74, 54, 61, 58;
2, 18, 26, 24, 40, 42, 38, 54, 56, 44, 82, 70, 82, 60, 65, 66;
4, 16, 28, 38, 26, 50, 44, 42, 56, 66, 58, 86, 72, 86, 74, 69, 68;
4, 24, 20, 36, 48, 34, 54, 50, 48, 70, 70, 64, 92, 80, 92, 86, 73, 74;
2, 14, 26, 26, 46, 50, 44, 56, 56, 66, 74, 72, 68, 98, 86, 100, 92, 79, 96;
2, 12, 22, 36, 32, 52, 58, 56, 60, 62, 72, 76, 78, 80, 108, 104, 102, 96, 85, 98; ...
Notice the positions of the odd numbers and of the number 2;
the only odd numbers appear adjacent to the main diagonal and
the number 2 only appears in the first column.
		

Crossrefs

Cf. A011756, A217917 (odd numbers that appear), A217918 (positions of 2), A217919 (rows in which 2 appears), A217920 (column 1).

Programs

  • PARI
    /* Using the recurrence (slow) */
    {a(n)=if(n<1,0,if(n==1,2,prime(n)-sum(k=1,floor(1/2+sqrt(2*n))-1,a(n-k))))}
    for(n=1,120,print1(a(n),", "))
    
  • PARI
    /* Print as a Triangle of M Rows (much faster) */
    {M=20;A=vector(M*(M+1)/2);}
    {a(n)=A[n]=if(n<1,0,if(n==1,2,prime(n)-sum(k=1,floor(1/2+sqrt(2*n))-1,A[n-k])))}
    for(n=1,M,for(k=1,n,print1(a(n*(n-1)/2+k),", "));print(""))

Formula

Row sums equal A011756(n) = prime(n(n+1)/2).

A068049 The first term greater than one on each row of A068009. a(n) = A068009[n, A002024[n]].

Original entry on oeis.org

2, 2, 2, 2, 2, 2, 3, 2, 2, 2, 3, 3, 2, 2, 2, 4, 3, 3, 2, 2, 2, 5, 4, 3, 3, 2, 2, 2, 6, 5, 4, 3, 3, 2, 2, 2, 7, 6, 5, 4, 3, 3, 2, 2, 2, 9, 7, 6, 5, 4, 3, 3, 2, 2, 2, 11, 9, 7, 6, 5, 4, 3, 3, 2, 2, 2, 13, 11, 9, 7, 6, 5, 4, 3, 3, 2, 2, 2, 16, 13, 11, 9, 7, 6, 5, 4, 3, 3, 2, 2, 2, 19, 16, 13, 11, 9, 7, 6, 5
Offset: 1

Views

Author

Antti Karttunen, Feb 11 2002

Keywords

Comments

In row 1 of A068009 the first term > 1 is found at position 1, for rows 2 & 3 at position 2, for rows 4,5,6 at position 3, for rows 7,8,9,10 at position 4 etc., thus it is natural to view this also as a triangular table.

Crossrefs

a(n) = A000009(A025581(n-1))+1. Specifically, the left edge is equal to A000009[n]+1 (i.e. apart from the first term = A052839) and the right edge is all-2 sequence A007395.

Programs

  • Maple
    [seq(A000009(A025581(j-1))+1,j=1..99)];
    A025581 := n-> binomial(1+floor(1/2+sqrt(2+2*n)),2)-(n+1);
    N := 100; t1 := series(mul(1+x^k,k=1..N),x,N); A000009 := proc(n) coeff(t1,x,n); end;
  • Mathematica
    a[n_] := PartitionsQ[(1/2)(Floor[Sqrt[2n]+1/2]^2 + Floor[Sqrt[2n]+1/2] - 2n)] + 1; Array[a, 100] (* Jean-François Alcover, Mar 02 2016 *)

A131914 3*A002024 - 2*A051340.

Original entry on oeis.org

1, 4, 2, 7, 5, 3, 10, 8, 6, 4, 13, 11, 9, 7, 5, 16, 14, 12, 10, 8, 6, 19, 17, 15, 13, 11, 9, 7, 22, 20, 18, 16, 14, 12, 10, 8, 25, 23, 21, 19, 17, 15, 13, 11, 9, 28, 26, 24, 22, 20, 18, 16, 14, 12, 10
Offset: 1

Views

Author

Gary W. Adamson, Jul 27 2007

Keywords

Comments

Row sums = the hexagonal numbers, A000384: (1, 6, 15, 28, 45, ...).
From Boris Putievskiy, Jan 24 2013: (Start)
Table T(n,k) = n + 3*k - 3, n, k > 0, read by antidiagonals. General case A209304. Let m be a positive integer. The first column of the table T(n,1) is the sequence of the positive integers A000027. Every subsequent column is formed from the previous column, shifted by m elements.
For m=0 the result is A002260,
for m=1 the result is A002024,
for m=2 the result is A128076,
for m=3 the result is A131914,
for m=4 the result is A209304. (End)

Examples

			First few rows of the triangle:
   1;
   4,  2;
   7,  5,  3;
  10,  8,  6,  4;
  13, 11,  9,  7,  5;
  16, 14, 12, 10,  8,  6;
  19, 17, 15, 13, 11,  9,  7;
  ...
		

Crossrefs

Formula

3*A002024 - 2*A051340 as infinite lower triangular matrices.
From Boris Putievskiy, Jan 24 2013: (Start)
For the general case
a(n) = m*A003056 - (m-1)*A002260.
a(n) = m*(t+1) + (m-1)*(t*(t+1)/2-n), where t = floor((-1+sqrt(8*n-7))/2).
For m = 3,
a(n) = 3*A003056 - 2*A002260.
a(n) = 3*(t+1) + 2*(t*(t+1)/2-n), where t = floor((-1+sqrt(8*n-7))/2). (End)
Showing 1-10 of 284 results. Next