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

A340520 a(n) = 2*A006463(n) + 1.

Original entry on oeis.org

1, 3, 5, 9, 13, 17, 23, 29, 35, 41, 49, 57, 65, 73, 81, 91, 101, 111, 121, 131, 141, 153, 165, 177, 189, 201, 213, 225, 239, 253, 267, 281, 295, 309, 323, 337, 353, 369, 385, 401, 417, 433, 449, 465, 481, 499, 517, 535, 553, 571, 589, 607, 625, 643, 661, 681, 701, 721, 741, 761, 781, 801
Offset: 1

Views

Author

N. J. A. Sloane, Feb 04 2021

Keywords

Comments

Index of start of row n in b-files for triangles (such as A237593, A262045) where the rows have length 2*A003056(n).

Crossrefs

Programs

  • Python
    from math import isqrt
    def A340520(n): return (m:=isqrt((n<<3)+1)-1>>1)*(6*n-2-m*(m+3))//3|1 # Chai Wah Wu, Jun 07 2025

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

A004200 Continued fraction for Sum_{k>=0} 1/3^(2^k).

Original entry on oeis.org

0, 2, 5, 3, 3, 1, 3, 5, 3, 1, 5, 3, 1, 3, 3, 5, 3, 1, 5, 3, 3, 1, 3, 5, 1, 3, 5, 3, 1, 3, 3, 5, 3, 1, 5, 3, 3, 1, 3, 5, 3, 1, 5, 3, 1, 3, 3, 5, 1, 3, 5, 3, 3, 1, 3, 5, 1, 3, 5, 3, 1, 3, 3, 5, 3, 1, 5, 3, 3, 1, 3, 5, 3, 1, 5, 3, 1, 3, 3, 5, 3, 1, 5, 3, 3, 1, 3, 5, 1, 3, 5, 3, 1, 3, 3, 5, 1, 3, 5, 3, 3, 1, 3, 5, 3
Offset: 0

Views

Author

Keywords

Examples

			0.456942562477639661115491826... = 0 + 1/(2 + 1/(5 + 1/(3 + 1/(3 + ...)))).
		

References

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

Crossrefs

Cf. A007400, A078885 (decimal expansion).

Programs

  • Maple
    u := 3: v := 7: Buv := [u,1,[0,u-1,u+1]]: for k from 2 to v do n := nops(Buv[3]): Buv := [u,Buv[2]+1,[seq(Buv[3][i],i=1..n-1),Buv[3][n]+1,Buv[3][n]-1,seq(Buv[3][n-i],i=1..n-2)]] od: seq(Buv[3][i],i=1..2^v);# first 2^v terms of A004200 # Antonio G. Astudillo (afg_astudillo(AT)hotmail.com), Dec 02 2002
  • Mathematica
    ContinuedFraction[ NSum[1/3^(2^n), {n, 0, Infinity}, WorkingPrecision -> 105], 105] (* Jean-François Alcover, Jul 18 2011 *)
  • PARI
    { allocatemem(932245000); default(realprecision, 20000); x=suminf(n=0, 1/3^(2^n)); x=contfrac(x); for (n=1, 20001, write("b004200.txt", n-1, " ", x[n])); } \\ Harry J. Smith, May 10 2009

Formula

Recurrence: a(0)=0, a(1)=2, a(2)=5, a(16n+5)=a(16n+12)=a(32n+9)=a(32n+24)=1, a(8n+3)=a(8n+6)=a(16n+4)=a(16n+13)=a(32n+8)=a(32n+25)=3, a(8n+2)=a(8n+7)=5, a(16n)=a(8n), a(16n+1)=a(8n+1). - Ralf Stephan, May 17 2005

Extensions

Better description and more terms from Antonio G. Astudillo (afg_astudillo(AT)hotmail.com), Jun 19 2001

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

A006466 Continued fraction expansion of C = 2*Sum_{n>=0} 1/2^(2^n).

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 2
Offset: 0

Views

Author

Keywords

Comments

C arises when looking for a sequence b(n) such that b(1)=0 and b(n+1) is the smallest integer > b(n) such that the continued fraction for 1/2^b(1) + 1/2^b(2) + ... + 1/2^b(n+1) contains only 1's or 2's. It arises because b(n) = 2^n - 1 and C = Sum_{k>=0} 1/2^b(k). - Benoit Cloitre, Nov 03 2002

Examples

			1.632843018043786287416159475... = 1 + 1/(1 + 1/(1 + 1/(1 + 1/(2 + ...)))). - _Harry J. Smith_, May 09 2009
		

References

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

Crossrefs

Cf. A076214 = Decimal expansion. - Harry J. Smith, May 09 2009

Programs

  • PARI
    { allocatemem(932245000); default(realprecision, 10000); x=suminf(n=0, 1/2^(2^n)); x=contfrac(2*x); for (n=1, 20001, write("b006466.txt", n-1, " ", x[n])); } \\ Harry J. Smith, May 09 2009

Formula

Recurrence: a(5n) = a(5n+1) = a(2) = a(5n+3) = a(20n+14) = a(40n+9) = 1, a(20n+4) = a(40n+29) = 2, a(5n+2) = 3 - a(5n-1), a(20n+19) = a(10n+9). - Ralf Stephan, May 17 2005

Extensions

Better description and more terms from Antonio G. Astudillo (afg_astudillo(AT)hotmail.com), Jun 19 2001

A006464 Continued fraction for Sum_{n>=0} 1/4^(2^n).

Original entry on oeis.org

0, 3, 6, 4, 4, 2, 4, 6, 4, 2, 6, 4, 2, 4, 4, 6, 4, 2, 6, 4, 4, 2, 4, 6, 2, 4, 6, 4, 2, 4, 4, 6, 4, 2, 6, 4, 4, 2, 4, 6, 4, 2, 6, 4, 2, 4, 4, 6, 2, 4, 6, 4, 4, 2, 4, 6, 2, 4, 6, 4, 2, 4, 4, 6, 4, 2, 6, 4, 4, 2, 4, 6, 4, 2, 6, 4, 2, 4, 4, 6, 4, 2, 6, 4, 4, 2, 4, 6, 2, 4, 6, 4, 2, 4, 4, 6, 2, 4, 6, 4, 4, 2, 4, 6, 4
Offset: 0

Views

Author

Keywords

Comments

a(n)=A004200(n) if n=0; A004200(n)+1 if n>0 (according to case u=3, b=1 of Theorem 5 (of the reference) which states that: if B(u,infinity) = Sum_{n>=0} 1/u^(2^n) = [a0, a1, a2, ...] then B(u + b,infinity) = [a0, a1+b, a2+b, a3+b,... ] (u >= 3, b >= 0)).
The sum is equal to 0.316421509021893143708079...= A078585.
After computing the first 10^5 terms and dropping the first two (0 & 3), only the numbers 2, 4 & 6 occur. Further I found no two 0's in a row and no three 2's or three 1's in a row. - Robert G. Wilson v, Dec 01 2002

Examples

			0.316421509021893143708079737... = 0 + 1/(3 + 1/(6 + 1/(4 + 1/(4 + ...)))). - _Harry J. Smith_, May 11 2009
		

References

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

Programs

  • Maple
    u := 4: v := 7: Buv := [u,1,[0,u-1,u+1]]: for k from 2 to v do n := nops(Buv[3]): Buv := [u,Buv[2]+1,[seq(Buv[3][i],i=1..n-1),Buv[3][n]+1,Buv[3][n]-1,seq(Buv[3][n-i],i=1..n-2)]] od:seq(Buv[3][i],i=1..2^v);# first 2^v terms of A006464, Antonio G. Astudillo (aft_astudillo(AT)hotmail.com), Dec 02 2002
  • Mathematica
    ContinuedFraction[ N[ Sum[1/4^(2^n), {n, 0, Infinity}], 1000]]
  • PARI
    { allocatemem(932245000); default(realprecision, 25000); x=suminf(n=0, 1/4^(2^n)); x=contfrac(x); for (n=1, 20001, write("b006464.txt", n-1, " ", x[n])); } \\ Harry J. Smith, May 11 2009

Extensions

Better description and more terms from Antonio G. Astudillo (afg_astudillo(AT)hotmail.com), Jun 19 2001

A076269 Size of largest antichain in partition lattice Par(n).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 2, 2, 2, 3, 4, 4, 5, 6, 7, 9, 10, 11, 14, 17, 20, 24, 29, 35, 40, 48, 55
Offset: 0

Views

Author

Edward Early, Nov 05 2002

Keywords

Comments

Par(n) is the set of partitions of n under "dominance order": partition P is <= partition Q iff the sum of the largest k parts of P is <= the corresponding sum for Q for all k.

Examples

			a(10)=4; one antichain consists of 5+1+1+1+1+1, 4+3+1+1+1, 4+2+2+2 and 3+3+3+1.
		

Crossrefs

Programs

  • Mathematica
    leq[p_, q_] := If[Length[p]
    				

Formula

Order of growth is between n^(-5/2)e^(Pi*sqrt(2n/3)) and n^(-1)e^(Pi*sqrt(2n/3)).

Extensions

Edited by Dean Hickerson, Nov 09 2002
a(22)-a(26) by Paul Tabatabai, Dec 05 2018

A006465 Continued fraction for 4^5*Sum_{n>=0} 1/4^(2^n).

Original entry on oeis.org

324, 63, 1, 1023, 64, 1023, 1, 63, 1023, 1, 63, 1023, 1, 62, 1, 1023, 63, 1, 1023, 64, 1023, 1, 63, 1023, 1, 62, 1, 1023, 64, 1023, 1, 63, 1023, 1, 62, 1, 1023, 63, 1, 1023, 63, 1, 1023, 64, 1023, 1
Offset: 0

Views

Author

Keywords

Examples

			324.015625238418579157... = 324 + 1/(63 + 1/(1 + 1/(1023 + 1/(64 + ...)))). - _Harry J. Smith_, May 12 2009
		

References

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

Crossrefs

Cf. A160387 = Decimal expansion. - Harry J. Smith, May 12 2009

Programs

  • PARI
    { allocatemem(932245000); default(realprecision, 66000); x=4^5*suminf(n=0, 1/4^(2^n)); x=contfrac(x); for (n=1, 20001, write("b006465.txt", n-1, " ", x[n])); } \\ Harry J. Smith, May 12 2009

Extensions

Better description from Antonio G. Astudillo (afg_astudillo(AT)hotmail.com), Dec 02 2002

A006467 Continued fraction for Sum_{n>=0} (-1)^n/3^(2^n).

Original entry on oeis.org

0, 4, 3, 1, 3, 5, 1, 3, 5, 3, 3, 1, 5, 3, 1, 3, 3, 5, 3, 1, 3, 5, 1, 3, 3, 5, 3, 1, 5, 3, 1, 3, 5, 3, 3, 1, 3, 5, 1, 3, 5, 3, 3, 1, 5, 3, 1, 3, 5, 3, 3, 1, 3, 5, 1, 3, 3, 5, 3, 1, 5, 3, 1, 3, 3, 5, 3, 1, 3, 5, 1, 3, 5, 3, 3, 1, 5, 3, 1, 3, 3, 5, 3, 1, 3, 5, 1, 3, 3, 5, 3, 1, 5, 3, 1, 3, 3, 5, 3, 1, 3, 5, 1, 3, 5
Offset: 0

Views

Author

Keywords

Examples

			0.234415508674864614413415474... = 0 + 1/(4 + 1/(3 + 1/(1 + 1/(3 + ...)))). - _Harry J. Smith_, May 12 2009
		

References

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

Crossrefs

Cf. A160386 (decimal expansion). - Harry J. Smith, May 12 2009

Programs

  • Maple
    u := 3: v := 7: Buv := [u,1,[0,u+1,u-1]]: for k from 2 to v do n := nops(Buv[3]): Buv := [u,Buv[2]+1,[seq(Buv[3][i],i=1..n-1),Buv[3][n]-(-1)^Buv[2],Buv[3][n]+(-1)^Buv[2],seq(Buv[3][n-i],i=1..n-2)]] od:seq(Buv[3][i],i=1..2^v); # first 2^v terms of A006467 # Antonio G. Astudillo (afg_astudillo(AT)hotmail.com), Dec 02 2002
  • PARI
    { allocatemem(932245000); default(realprecision, 20000); x=suminf(n=0, (-1)^n/3^(2^n)); x=contfrac(x); for (n=1, 20001, write("b006467.txt", n-1, " ", x[n])); } \\ Harry J. Smith, May 12 2009

Extensions

Better description and more terms from Antonio G. Astudillo (afg_astudillo(AT)hotmail.com), Jun 19 2001

A327629 Expansion of Sum_{k>=1} x^(k*(k + 1)/2) / (1 - x^(k*(k + 1)/2))^2.

Original entry on oeis.org

1, 2, 4, 4, 5, 9, 7, 8, 12, 11, 11, 18, 13, 14, 21, 16, 17, 27, 19, 22, 29, 22, 23, 36, 25, 26, 36, 29, 29, 50, 31, 32, 44, 34, 35, 55, 37, 38, 52, 44, 41, 65, 43, 44, 64, 46, 47, 72, 49, 55, 68, 52, 53, 81, 56, 58, 76, 58, 59, 100, 61, 62, 87, 64, 65, 100, 67, 68, 92, 77
Offset: 1

Views

Author

Ilya Gutkovskiy, Sep 19 2019

Keywords

Comments

Sum of divisors d of n such that n/d is triangular number.

Crossrefs

Programs

  • Mathematica
    nmax = 70; CoefficientList[Series[Sum[x^(k (k + 1)/2)/(1 - x^(k (k + 1)/2))^2, {k, 1, nmax}], {x, 0, nmax}], x] // Rest
    a[n_] := DivisorSum[n, # &, IntegerQ[Sqrt[8 n/# + 1]] &]; Table[a[n], {n, 1, 70}]
  • PARI
    a(n)={sumdiv(n, d, if(ispolygonal(d,3), n/d))} \\ Andrew Howroyd, Sep 19 2019
    
  • Python
    from sympy import divisors
    from sympy.ntheory.primetest import is_square
    def A327629(n): return sum(n//d for d in divisors(n,generator=True) if is_square((d<<3)+1)) # Chai Wah Wu, Jun 07 2025

Formula

a(n) = Sum_{d|n} A010054(n/d) * d.
Showing 1-10 of 12 results. Next