[go: up one dir, main page]

login
Search: a008438 -id:a008438
     Sort: relevance | references | number | modified | created      Format: long | short | data
a(n) = sigma(n), the sum of the divisors of n. Also called sigma_1(n).
(Formerly M2329 N0921)
+10
5087
1, 3, 4, 7, 6, 12, 8, 15, 13, 18, 12, 28, 14, 24, 24, 31, 18, 39, 20, 42, 32, 36, 24, 60, 31, 42, 40, 56, 30, 72, 32, 63, 48, 54, 48, 91, 38, 60, 56, 90, 42, 96, 44, 84, 78, 72, 48, 124, 57, 93, 72, 98, 54, 120, 72, 120, 80, 90, 60, 168, 62, 96, 104, 127, 84, 144, 68, 126, 96, 144
OFFSET
1,2
COMMENTS
Multiplicative: If the canonical factorization of n into prime powers is the product of p^e(p) then sigma_k(n) = Product_p ((p^((e(p)+1)*k))-1)/(p^k-1).
Sum_{d|n} 1/d^k is equal to sigma_k(n)/n^k. So sequences A017665-A017712 also give the numerators and denominators of sigma_k(n)/n^k for k = 1..24. The power sums sigma_k(n) are in sequences A000203 (this sequence) (k=1), A001157-A001160 (k=2,3,4,5), A013954-A013972 for k = 6,7,...,24. - Ahmed Fares (ahmedfares(AT)my-deja.com), Apr 05 2001
A number n is abundant if sigma(n) > 2n (cf. A005101), perfect if sigma(n) = 2n (cf. A000396), deficient if sigma(n) < 2n (cf. A005100).
a(n) is the number of sublattices of index n in a generic 2-dimensional lattice. - Avi Peretz (njk(AT)netvision.net.il), Jan 29 2001 [In the language of group theory, a(n) is the number of index-n subgroups of Z x Z. - Jianing Song, Nov 05 2022]
The sublattices of index n are in one-to-one correspondence with matrices [a b; 0 d] with a>0, ad=n, b in [0..d-1]. The number of these is Sum_{d|n} d = sigma(n), which is a(n). A sublattice is primitive if gcd(a,b,d) = 1; the number of these is n * Product_{p|n} (1+1/p), which is A001615. [Cf. Grady reference.]
Sum of number of common divisors of n and m, where m runs from 1 to n. - Naohiro Nomoto, Jan 10 2004
a(n) is the cardinality of all extensions over Q_p with degree n in the algebraic closure of Q_p, where p>n. - Volker Schmitt (clamsi(AT)gmx.net), Nov 24 2004. Cf. A100976, A100977, A100978 (p-adic extensions).
Let s(n) = a(n-1) + a(n-2) - a(n-5) - a(n-7) + a(n-12) + a(n-15) - a(n-22) - a(n-26) + ..., then a(n) = s(n) if n is not pentagonal, i.e., n != (3 j^2 +- j)/2 (cf. A001318), and a(n) is instead s(n) - ((-1)^j)*n if n is pentagonal. - Gary W. Adamson, Oct 05 2008 [corrected Apr 27 2012 by William J. Keith based on Ewell and by Andrey Zabolotskiy, Apr 08 2022]
Write n as 2^k * d, where d is odd. Then a(n) is odd if and only if d is a square. - Jon Perry, Nov 08 2012
Also total number of parts in the partitions of n into equal parts. - Omar E. Pol, Jan 16 2013
Note that sigma(3^4) = 11^2. On the other hand, Kanold (1947) shows that the equation sigma(q^(p-1)) = b^p has no solutions b > 2, q prime, p odd prime. - N. J. A. Sloane, Dec 21 2013, based on postings to the Number Theory Mailing List by Vladimir Letsko and Luis H. Gallardo
Limit_{m->infinity} (Sum_{n=1..prime(m)} a(n)) / prime(m)^2 = zeta(2)/2 = Pi^2/12 (A072691). See more at A244583. - Richard R. Forberg, Jan 04 2015
a(n) + A000005(n) is an odd number iff n = 2m^2, m>=1. - Richard R. Forberg, Jan 15 2015
a(n) = a(n+1) for n = 14, 206, 957, 1334, 1364 (A002961). - Zak Seidov, May 03 2016
Also the total number of horizontal rhombuses in the terraces of the n-th level of an irregular stepped pyramid (starting from the top) whose structure arises after the k-degree-zig-zag folding of every row of the diagram of the isosceles triangle A237593, where k is an angle greater than zero and less than 180 degrees. - Omar E. Pol, Jul 05 2016
Equivalent to the Riemann hypothesis: a(n) < H(n) + exp(H(n))*log(H(n)), for all n>1, where H(n) is the n-th harmonic number (Jeffrey Lagarias). See A057641 for more details. - Ilya Gutkovskiy, Jul 05 2016
a(n) is the total number of even parts in the partitions of 2*n into equal parts. More generally, a(n) is the total number of parts congruent to 0 mod k in the partitions of k*n into equal parts (the comment dated Jan 16 2013 is the case for k = 1). - Omar E. Pol, Nov 18 2019
From Jianing Song, Nov 05 2022: (Start)
a(n) is also the number of order-n subgroups of C_n X C_n, where C_n is the cyclic group of order n. Proof: by the correspondence theorem in the group theory, there is a one-to-one correspondence between the order-n subgroups of C_n X C_n = (Z x Z)/(nZ x nZ) and the index-n subgroups of Z x Z containing nZ x nZ. But an index-n normal subgroup of a (multiplicative) group G contains {g^n : n in G} automatically. The desired result follows from the comment from Naohiro Nomoto above.
The number of subgroups of C_n X C_n that are isomorphic to C_n is A001615(n). (End)
REFERENCES
M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 840.
T. M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, 1976, page 38.
A. T. Benjamin and J. J. Quinn, Proofs that really count: the art of combinatorial proof, M.A.A. 2003, p. 116ff.
L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 162, #16, (6), 2nd formula.
G. H. Hardy, Ramanujan: twelve lectures on subjects suggested by his life and work, AMS Chelsea Publishing, Providence, Rhode Island, 2002, pp. 141, 166.
H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, Fifth Edition, Clarendon Press, Oxford, 2003.
Ross Honsberger, "Mathematical Gems, Number One," The Dolciani Mathematical Expositions, Published and Distributed by The Mathematical Association of America, page 116.
Kanold, Hans Joachim, Kreisteilungspolynome und ungerade vollkommene Zahlen. (German), Ber. Math.-Tagung Tübingen 1946, (1947). pp. 84-87.
M. Krasner, Le nombre des surcorps primitifs d'un degré donné et le nombre des surcorps métagaloisiens d'un degré donné d'un corps de nombres p-adiques. Comptes Rendus Hebdomadaires, Académie des Sciences, Paris 254, 255, 1962.
A. Lubotzky, Counting subgroups of finite index, Proceedings of the St. Andrews/Galway 93 group theory meeting, Th. 2.1. LMS Lecture Notes Series no. 212 Cambridge University Press 1995.
D. S. Mitrinovic et al., Handbook of Number Theory, Kluwer, Section III.1, page 77.
G. Polya, Induction and Analogy in Mathematics, vol. 1 of Mathematics and Plausible Reasoning, Princeton Univ Press 1954, page 92.
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).
Robert M. Young, Excursions in Calculus, The Mathematical Association of America, 1992 p. 361.
LINKS
Daniel Forgues, Table of n, a(n) for n = 1..100000 (first 20000 terms from N. J. A. Sloane)
M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards, Applied Math. Series 55, Tenth Printing, 1972 [alternative scanned copy].
B. Apostol and L. Petrescu, Extremal Orders of Certain Functions Associated with Regular Integers (mod n), Journal of Integer Sequences, 2013, # 13.7.5.
Joerg Arndt, On computing the generalized Lambert series, arXiv:1202.6525v3 [math.CA], (2012).
M. Baake and U. Grimm, Quasicrystalline combinatorics
C. K. Caldwell, The Prime Glossary, sigma function
Imanuel Chen and Michael Z. Spivey, Integral Generalized Binomial Coefficients of Multiplicative Functions, Preprint 2015; Summer Research Paper 238, Univ. Puget Sound.
D. Christopher and T. Nadu, Partitions with Fixed Number of Sizes, Journal of Integer Sequences, 15 (2015), #15.11.5.
J. N. Cooper and A. W. N. Riasanovsky, On the Reciprocal of the Binary Generating Function for the Sum of Divisors, 2012. - From N. J. A. Sloane, Dec 25 2012
Jason Earls, The Smarandache sum of composites between factors function, in Smarandache Notions Journal (2004), Vol. 14.1, page 243.
L. Euler, An observation on the sums of divisors, arXiv:math/0411587 [math.HO], 2004-2009.
J. A. Ewell, Recurrences for the sum of divisors, Proc. Amer. Math. Soc. 64 (2) 1977.
F. Firoozbakht and M. F. Hasler, Variations on Euclid's formula for Perfect Numbers, JIS 13 (2010) #10.3.1.
Daniele A. Gewurz and Francesca Merola, Sequences realized as Parker vectors ..., J. Integer Seqs., Vol. 6, 2003.
Johan Gielis and Ilia Tavkhelidze, The general case of cutting of GML surfaces and bodies, arXiv:1904.01414 [math.GM], 2019.
J. W. L. Glaisher, On the function chi(n), Quarterly Journal of Pure and Applied Mathematics, 20 (1884), 97-167.
J. W. L. Glaisher, On the function chi(n), Quarterly Journal of Pure and Applied Mathematics, 20 (1884), 97-167. [Annotated scanned copy]
M. J. Grady, A group theoretic approach to a famous partition formula, Amer. Math. Monthly, 112 (No. 7, 2005), 645-651.
Masazumi Honda and Takuya Yoda, String theory, N = 4 SYM and Riemann hypothesis, arXiv:2203.17091 [hep-th], 2022.
Douglas E. Iannucci, On sums of the small divisors of a natural number, arXiv:1910.11835 [math.NT], 2019.
P. A. MacMahon, Divisors of numbers and their continuations in the theory of partitions, Proc. London Math. Soc., 19 (1921), 75-113.
M. Maia and M. Mendez, On the arithmetic product of combinatorial species, arXiv:math.CO/0503436, 2005.
P. Pollack and C. Pomerance, Some problems of Erdős on the sum-of-divisors function, For Richard Guy on his 99th birthday: May his sequence be unbounded, Trans. Amer. Math. Soc. Ser. B 3 (2016), 1-26; errata.
Carl Pomerance and Hee-Sung Yang, Variant of a theorem of Erdős on the sum-of-proper-divisors function, Math. Comp. 83 (2014), 1903-1913.
J. S. Rutherford, The enumeration and symmetry-significant properties of derivative lattices, Act. Cryst. (1992) A48, 500-508. - N. J. A. Sloane, Mar 14 2009
J. S. Rutherford, The enumeration and symmetry-significant properties of derivative lattices II, Acta Cryst. A49 (1993), 293-300. - N. J. A. Sloane, Mar 14 2009
N. J. A. Sloane, "A Handbook of Integer Sequences" Fifty Years Later, arXiv:2301.03149 [math.NT], 2023, p. 3.
Eric Weisstein's World of Mathematics, Divisor Function
Wikipedia, Divisor function
FORMULA
Multiplicative with a(p^e) = (p^(e+1)-1)/(p-1). - David W. Wilson, Aug 01 2001
For the following bounds and many others, see Mitrinovic et al. - N. J. A. Sloane, Oct 02 2017
If n is composite, a(n) > n + sqrt(n).
a(n) < n*sqrt(n) for all n.
a(n) < (6/Pi^2)*n^(3/2) for n > 12.
G.f.: -x*deriv(eta(x))/eta(x) where eta(x) = Product_{n>=1} (1-x^n). - Joerg Arndt, Mar 14 2010
L.g.f.: -log(Product_{j>=1} (1-x^j)) = Sum_{n>=1} a(n)/n*x^n. - Joerg Arndt, Feb 04 2011
Dirichlet convolution of phi(n) and tau(n), i.e., a(n) = sum_{d|n} phi(n/d)*tau(d), cf. A000010, A000005.
a(n) is odd iff n is a square or twice a square. - Robert G. Wilson v, Oct 03 2001
a(n) = a(n*prime(n)) - prime(n)*a(n). - Labos Elemer, Aug 14 2003 (Clarified by Omar E. Pol, Apr 27 2016)
a(n) = n*A000041(n) - Sum_{i=1..n-1} a(i)*A000041(n-i). - Jon Perry, Sep 11 2003
a(n) = -A010815(n)*n - Sum_{k=1..n-1} A010815(k)*a(n-k). - Reinhard Zumkeller, Nov 30 2003
a(n) = f(n, 1, 1, 1), where f(n, i, x, s) = if n = 1 then s*x else if p(i)|n then f(n/p(i), i, 1+p(i)*x, s) else f(n, i+1, 1, s*x) with p(i) = i-th prime (A000040). - Reinhard Zumkeller, Nov 17 2004
Recurrence: n^2*(n-1)*a(n) = 12*Sum_{k=1..n-1} (5*k*(n-k) - n^2)*a(k)*a(n-k), if n>1. - Dominique Giard (dominique.giard(AT)gmail.com), Jan 11 2005
G.f.: Sum_{k>0} k * x^k / (1 - x^k) = Sum_{k>0} x^k / (1 - x^k)^2. Dirichlet g.f.: zeta(s)*zeta(s-1). - Michael Somos, Apr 05 2003. See the Hardy-Wright reference, p. 312. first equation, and p. 250, Theorem 290. - Wolfdieter Lang, Dec 09 2016
For odd n, a(n) = A000593(n). For even n, a(n) = A000593(n) + A074400(n/2). - Jonathan Vos Post, Mar 26 2006
Equals the inverse Moebius transform of the natural numbers. Equals row sums of A127093. - Gary W. Adamson, May 20 2007
A127093 * [1/1, 1/2, 1/3, ...] = [1/1, 3/2, 4/3, 7/4, 6/5, 12/6, 8/7, ...]. Row sums of triangle A135539. - Gary W. Adamson, Oct 31 2007
a(n) = A054785(2*n) - A000593(2*n). - Reinhard Zumkeller, Apr 23 2008
a(n) = n*Sum_{k=1..n} A060642(n,k)/k*(-1)^(k+1). - Vladimir Kruchinin, Aug 10 2010
Dirichlet convolution of A037213 and A034448. - R. J. Mathar, Apr 13 2011
G.f.: A(x) = x/(1-x)*(1 - 2*x*(1-x)/(G(0) - 2*x^2 + 2*x)); G(k) = -2*x - 1 - (1+x)*k + (2*k+3)*(x^(k+2)) - x*(k+1)*(k+3)*((-1 + (x^(k+2)))^2)/G(k+1); (continued fraction). - Sergei N. Gladkovskii, Dec 06 2011
a(n) = A001065(n) + n. - Mats Granvik, May 20 2012
a(n) = A006128(n) - A220477(n). - Omar E. Pol, Jan 17 2013
a(n) = Sum_{k=1..A003056(n)} (-1)^(k-1)*A196020(n,k). - conjectured by Omar E. Pol, Feb 02 2013, and proved by Max Alekseyev, Nov 17 2013
a(n) = Sum_{k=1..A003056(n)} (-1)^(k-1)*A000330(k)*A000716(n-A000217(k)). - Mircea Merca, Mar 05 2014
a(n) = A240698(n, A000005(n)). - Reinhard Zumkeller, Apr 10 2014
a(n) = Sum_{d^2|n} A001615(n/d^2) = Sum_{d^3|n} A254981(n/d^3). - Álvar Ibeas, Mar 06 2015
a(3*n) = A144613(n). a(3*n + 1) = A144614(n). a(3*n + 2) = A144615(n). - Michael Somos, Jul 19 2015
a(n) = Sum{i=1..n} Sum{j=1..i} cos((2*Pi*n*j)/i). - Michel Lagneau, Oct 14 2015
a(n) = A000593(n) + A146076(n). - Omar E. Pol, Apr 05 2016
a(n) = A065475(n) + A048050(n). - Omar E. Pol, Nov 28 2016
a(n) = (Pi^2*n/6)*Sum_{q>=1} c_q(n)/q^2, with the Ramanujan sums c_q(n) given in A054533 as a c_n(k) table. See the Hardy reference, p. 141, or Hardy-Wright, Theorem 293, p. 251. - Wolfdieter Lang, Jan 06 2017
G.f. also (1 - E_2(q))/24, with the g.f. E_2 of A006352. See e.g., Hardy, p. 166, eq. (10.5.5). - Wolfdieter Lang, Jan 31 2017
From Antti Karttunen, Nov 25 2017: (Start)
a(n) = A048250(n) + A162296(n).
a(n) = A092261(n) * A295294(n). [This can be further expanded, see comment in A291750.] (End)
a(n) = A000593(n) * A038712(n). - Ivan N. Ianakiev and Omar E. Pol, Nov 26 2017
a(n) = Sum_{q=1..n} c_q(n) * floor(n/q), where c_q(n) is the Ramanujan's sum function given in A054533. - Daniel Suteu, Jun 14 2018
a(n) = Sum_{k=1..n} gcd(n, k) / phi(n / gcd(n, k)), where phi(k) is the Euler totient function. - Daniel Suteu, Jun 21 2018
a(n) = (2^(1 + (A000005(n) - A001227(n))/(A000005(n) - A183063(n))) - 1)*A000593(n) = (2^(1 + (A183063(n)/A001227(n))) - 1)*A000593(n). - Omar E. Pol, Nov 03 2018
a(n) = Sum_{i=1..n} tau(gcd(n, i)). - Ridouane Oudra, Oct 15 2019
From Peter Bala, Jan 19 2021: (Start)
G.f.: A(x) = Sum_{n >= 1} x^(n^2)*(x^n + n*(1 - x^(2*n)))/(1 - x^n)^2 - differentiate equation 5 in Arndt w.r.t. x, and set x = 1.
A(x) = F(x) + G(x), where F(x) is the g.f. of A079667 and G(x) is the g.f. of A117004. (End)
a(n) = Sum_{k=1..n} tau(n/gcd(n,k))*phi(gcd(n,k))/phi(n/gcd(n,k)). - Richard L. Ollerton, May 07 2021
With the convention that a(n) = 0 for n <= 0 we have the recurrence a(n) = t(n) + Sum_{k >= 1} (-1)^(k+1)*(2*k + 1)*a(n - k*(k + 1)/2), where t(n) = (-1)^(m+1)*(2*m+1)*n/3 if n = m*(m + 1)/2, with m positive, is a triangular number else t(n) = 0. For example, n = 10 = (4*5)/2 is a triangular number, t(10) = -30, and so a(10) = -30 + 3*a(9) - 5*a(7) + 7*a(4) = -30 + 39 - 40 + 49 = 18. - Peter Bala, Apr 06 2022
Recurrence: a(p^x) = p*a(p^(x-1)) + 1, if p is prime and for any integer x. E.g., a(5^3) = 5*a(5^2) + 1 = 5*31 + 1 = 156. - Jules Beauchamp, Nov 11 2022
Sum_{n>=1} a(n)/exp(2*Pi*n) = 1/24 - 1/(8*Pi) = A319462. - Vaclav Kotesovec, May 07 2023
EXAMPLE
For example, 6 is divisible by 1, 2, 3 and 6, so sigma(6) = 1 + 2 + 3 + 6 = 12.
Let L = <V,W> be a 2-dimensional lattice. The 7 sublattices of index 4 are generated by <4V,W>, <V,4W>, <4V,W+-V>, <2V,2W>, <2V+W,2W>, <2V,2W+V>. Compare A001615.
MAPLE
with(numtheory): A000203 := n->sigma(n); seq(A000203(n), n=1..100);
MATHEMATICA
Table[ DivisorSigma[1, n], {n, 100}]
a[ n_] := SeriesCoefficient[ QPolyGamma[ 1, 1, q] / Log[q]^2, {q, 0, n}]; (* Michael Somos, Apr 25 2013 *)
PROG
(Magma) [SumOfDivisors(n): n in [1..70]];
(Magma) [DivisorSigma(1, n): n in [1..70]]; // Bruno Berselli, Sep 09 2015
(PARI) {a(n) = if( n<1, 0, sigma(n))};
(PARI) {a(n) = if( n<1, 0, direuler( p=2, n, 1 / (1 - X) /(1 - p*X))[n])};
(PARI) {a(n) = if( n<1, 0, polcoeff( sum( k=1, n, x^k / (1 - x^k)^2, x * O(x^n)), n))}; /* Michael Somos, Jan 29 2005 */
(PARI) max_n = 30; ser = - sum(k=1, max_n, log(1-x^k)); a(n) = polcoeff(ser, n)*n \\ Gottfried Helms, Aug 10 2009
(MuPAD) numlib::sigma(n)$ n=1..81 // Zerinvary Lajos, May 13 2008
(SageMath) [sigma(n, 1) for n in range(1, 71)] # Zerinvary Lajos, Jun 04 2009
(Maxima) makelist(divsum(n), n, 1, 1000); \\ Emanuele Munarini, Mar 26 2011
(Haskell)
a000203 n = product $ zipWith (\p e -> (p^(e+1)-1) `div` (p-1)) (a027748_row n) (a124010_row n)
-- Reinhard Zumkeller, May 07 2012
(Scheme) (definec (A000203 n) (if (= 1 n) n (let ((p (A020639 n)) (e (A067029 n))) (* (/ (- (expt p (+ 1 e)) 1) (- p 1)) (A000203 (A028234 n)))))) ;; Uses macro definec from http://oeis.org/wiki/Memoization#Scheme - Antti Karttunen, Nov 25 2017
(Scheme) (define (A000203 n) (let ((r (sqrt n))) (let loop ((i (inexact->exact (floor r))) (s (if (integer? r) (- r) 0))) (cond ((zero? i) s) ((zero? (modulo n i)) (loop (- i 1) (+ s i (/ n i)))) (else (loop (- i 1) s)))))) ;; (Stand-alone program) - Antti Karttunen, Feb 20 2024
(GAP)
A000203:=List([1..10^2], n->Sigma(n)); # Muniru A Asiru, Oct 01 2017
(Python)
from sympy import divisor_sigma
def a(n): return divisor_sigma(n, 1)
print([a(n) for n in range(1, 71)]) # Michael S. Branicky, Jan 03 2021
(Python)
from math import prod
from sympy import factorint
def a(n): return prod((p**(e+1)-1)//(p-1) for p, e in factorint(n).items())
print([a(n) for n in range(1, 51)]) # Michael S. Branicky, Feb 25 2024
(APL, Dyalog dialect) A000203 ← +/{ð←⍵{(0=⍵|⍺)/⍵}⍳⌊⍵*÷2 ⋄ 1=⍵:ð ⋄ ð, (⍵∘÷)¨(⍵=(⌊⍵*÷2)*2)↓⌽ð} ⍝ Antti Karttunen, Feb 20 2024
CROSSREFS
See A034885, A002093 for records. Bisections give A008438, A062731. Values taken are listed in A007609. A054973 is an inverse function.
For partial sums see A024916.
Row sums of A127093.
Cf. A009194, A082062 (gcd(a(n),n) and its largest prime factor), A179931, A192795 (gcd(a(n),A001157(n)) and largest prime factor).
Cf. also A034448 (sum of unitary divisors).
Cf. A007955 (products of divisors).
A001227, A000593 and this sequence have the same parity: A053866. - Omar E. Pol, May 14 2016
Cf. A054533.
KEYWORD
easy,core,nonn,nice,mult,changed
STATUS
approved
a(n) = 1 if n is a triangular number, otherwise 0.
+10
1567
1, 1, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
OFFSET
0,1
COMMENTS
This is essentially the q-expansion of the Jacobi theta function theta_2(q). (In theta_2 one has to ignore the initial factor of 2*q^(1/4) and then replace q by q^(1/2). See also A005369.) - N. J. A. Sloane, Aug 03 2014
Ramanujan theta functions: f(q) (see A121373), phi(q) (A000122), psi(q) (A010054), chi(q) (A000700).
Ramanujan's theta function f(a, b) = Sum_{n=-inf..inf} a^(n*(n+1)/2) * b^(n*(n-1)/2).
This sequence is the concatenation of the base-b digits in the sequence b^n, for any base b >= 2. - Davis Herring (herring(AT)lanl.gov), Nov 16 2004
Number of partitions of n into distinct parts such that the greatest part equals the number of all parts, see also A047993; a(n)=A117195(n,0) for n > 0; a(n) = 1-A117195(n,1) for n > 1. - Reinhard Zumkeller, Mar 03 2006
Triangle T(n,k), 0 <= k <= n, read by rows, given by A000007 DELTA A000004 where DELTA is the operator defined in A084938. - Philippe Deléham, Jan 03 2009
Convolved with A000041 = A022567, the convolution square of A000009. - Gary W. Adamson, Jun 11 2009
A008441(n) = Sum_{k=0..n} a(k)*a(n-k). - Reinhard Zumkeller, Nov 03 2009
Polcoeff inverse with alternate signs = A006950: (1, 1, 1, 2, 3, 4, 5, 7, ...). - Gary W. Adamson, Mar 15 2010
This sequence is related to Ramanujan's two-variable theta functions because this sequence is also the characteristic function of generalized hexagonal numbers. - Omar E. Pol, Jun 08 2012
Number 3 of the 14 primitive eta-products which are holomorphic modular forms of weight 1/2 listed by D. Zagier on page 30 of "The 1-2-3 of Modular Forms". - Michael Somos, May 04 2016
Number of partitions of n into consecutive parts that contain 1 as a part, n >= 1. - Omar E. Pol, Nov 27 2020
REFERENCES
J. H. Conway and N. J. A. Sloane, "Sphere Packings, Lattices and Groups", Springer-Verlag, p. 103.
M. D. Hirschhorn, The Power of q, Springer, 2017. See Psi page 9.
J. Tannery and J. Molk, Eléments de la Théorie des Fonctions Elliptiques, Vol. 2, Gauthier-Villars, Paris, 1902; Chelsea, NY, 1972, see p. 27.
E. T. Whittaker and G. N. Watson, A Course of Modern Analysis, Cambridge Univ. Press, 4th ed., 1963, p. 464.
LINKS
Mohammad K. Azarian, Remarks and Conjectures Regarding Combinatorics of Discrete Partial Functions, Int'l Math. Forum (2022) Vol. 17, No. 3, 129-141. See Conjecture 4.4, p. 137.
S. Cooper and M. D. Hirschhorn, Results of Hurwitz type for three squares, Discrete Math. 274 (2004), no. 1-3, 9-24. See psi(q).
Atli Fannar Franklín, Anders Claesson, Christian Bean, Henning Úlfarsson, and Jay Pantone, Restricted Permutations Enumerated by Inversions, arXiv:2406.16403 [cs.DM], 2024. See p. 2.
Shishuo Fu and Yaling Wang, Bijective recurrences concerning two Schröder triangles, arXiv:1908.03912 [math.CO], 2019.
M. D. Hirschhorn and J. A. Sellers, A Congruence Modulo 3 for Partitions into Distinct Non-Multiples of Four, Article 14.9.6, Journal of Integer Sequences, Vol. 17 (2014).
K. Ono, S. Robins and P. T. Wahl, On the representation of integers as sums of triangular numbers, Aequationes mathematicae, August 1995, Volume 50, Issue 1-2, pp 73-94, Proposition 1.
Franck Ramaharo, A generating polynomial for the pretzel knot, arXiv:1805.10680 [math.CO], 2018.
Eric Weisstein's World of Mathematics, Ramanujan Theta Functions
Wolfram Challenges, Separate Ones by Zeroes
FORMULA
Expansion of f(x, x^3) in powers of x where f(, ) is Ramanujan's general theta function.
Expansion of q^(-1) * (phi(q) - phi(q^4)) / 2 in powers of q^8. - Michael Somos, Jul 01 2014
Expansion of q^(-1/8) * eta(q^2)^2 / eta(q) in powers of q. - Michael Somos, Apr 13 2005
Euler transform of period 2 sequence [ 1, -1, ...]. - Michael Somos, Mar 24 2003
Given g.f. A(x), then B(q) = q * A(q^8) satisfies 0 = f(B(q), B(q^2), B(q^3), B(q^6)) where f(u1, u2, u3, u6) = u1*u6^3 + u2*u3^3 - u1*u2^2*u6. - Michael Somos, Apr 13 2005
a(n) = b(8*n + 1) where b()=A098108() is multiplicative with b(2^e) = 0^e, b(p^e) = (1 + (-1)^e) / 2 if p > 2. - Michael Somos, Jun 06 2005
a(n) = A005369(2*n). - Michael Somos, Apr 29 2003
G.f.: theta_2(sqrt(q)) / (2 * q^(1/8)).
G.f.: 1 / (1 - x / (1 + x / (1 + x^1 / (1 - x / (1 + x / (1 + x^2 / (1 - x / (1 + x / (1 + x^3 / ...))))))))). - Michael Somos, May 11 2012
G.f.: Product_{k>0} (1-x^(2*k))/(1-x^(2*k-1)). - Vladeta Jovovic, May 02 2002
a(0)=1; for n>0, a(n) = A002024(n+1)-A002024(n). - Benoit Cloitre, Jan 05 2004
G.f.: Sum_{j>=0} Product_{k=0..j} x^j. - Jon Perry, Mar 30 2004
a(n) = floor((1-cos(Pi*sqrt(8*n+1)))/2). - Carl R. White, Mar 18 2006
a(n) = round(sqrt(2n+1)) - round(sqrt(2n)). - Hieronymus Fischer, Aug 06 2007
a(n) = ceiling(2*sqrt(2n+1)) - floor(2*sqrt(2n)) - 1. - Hieronymus Fischer, Aug 06 2007
a(n) = f(n,0) with f(x,y) = if x > 0 then f(x-y,y+1), otherwise 0^(-x). - Reinhard Zumkeller, Sep 27 2008
a(n) = A035214(n) - 1.
From Mikael Aaltonen, Jan 22 2015: (Start)
Since the characteristic function of s-gonal numbers is given by floor(sqrt(2n/(s-2) + ((s-4)/(2s-4))^2) + (s-4)/(2s-4)) - floor(sqrt(2(n-1)/(s-2) + ((s-4)/(2s-4))^2) + (s-4)/(2s-4)), by setting s = 3 we get the following: For n > 0, a(n) = floor(sqrt(2*n+1/4)-1/2) - floor(sqrt(2*(n-1)+1/4)-1/2).
(End)
a(n) = (-1)^n * A106459(n). - Michael Somos, May 04 2016
G.f. is a period 1 Fourier series which satisfies f(-1 / (16 t)) = 2^(-1/2) (t/i)^(1/2) g(t) where q = exp(2 Pi i t) and g() is the g.f. for A002448. - Michael Somos, May 05 2016
G.f.: Sum_{n >= 0} x^(n*(n+1)/2) = Product_{n >= 1} (1 - x^n)*(1 + x^n)^2 = Product_{n >= 1} (1 - x^(2*n))*(1 + x^n) = Product_{n >= 1} (1 - x^(2*n))/(1 - x^(2*n-1)). From the sum and product representations of theta_2(0, sqrt(q))/(2*q^(1/8))) function. The last product, given by Vladeta Jovovic above, is obtained from the second to last one by an Euler identity, proved via f(x) := Product_{n >= 1} (1 - x^(2*n-1))*Product_{n >= 1} (1 + x^n) = f(x^2), by moving the odd-indexed factors of the second product to the first product. This leads to f(x) = f(0) = 1. - Wolfdieter Lang, Jul 05 2016
a(0) = 1, a(n) = (1/n)*Sum_{k=1..n} A002129(k)*a(n-k) for n > 0. - Seiichi Manyama, Apr 08 2017
EXAMPLE
G.f. = 1 + x + x^3 + x^6 + x^10 + x^15 + x^21 + x^28 + x^36 + x^45 + x^55 + x^66 + ...
G.f. for B(q) = q * A(q^8): q + q^9 + q^25 + q^49 + q^81 + q^121 + q^169 + q^225 + q^289 + q^361 + ...
From Philippe Deléham, Jan 04 2008: (Start)
As a triangle this begins:
1;
1, 0;
1, 0, 0;
1, 0, 0, 0;
1, 0, 0, 0, 0;
1, 0, 0, 0, 0, 0;
... (End)
MAPLE
A010054 := proc(n)
if issqr(1+8*n) then
1;
else
0;
end if;
end proc:
seq(A010054(n), n=0..80) ; # R. J. Mathar, Feb 22 2021
MATHEMATICA
a[ n_] := SquaresR[ 1, 8 n + 1] / 2; (* Michael Somos, Nov 15 2011 *)
a[ n_] := If[ n < 0, 0, SeriesCoefficient[ (Series[ EllipticTheta[ 3, Log[y] / (2 I), x^2], {x, 0, n + Floor @ Sqrt[n]}] // Normal // TrigToExp) /. {y -> x}, {x, 0, n}]]; (* Michael Somos, Nov 15 2011 *)
Table[If[IntegerQ[(Sqrt[8n+1]-1)/2], 1, 0], {n, 0, 110}] (* Harvey P. Dale, Oct 29 2012 *)
a[ n_] := SeriesCoefficient[ EllipticTheta[ 2, 0, q^(1/2)] / (2 q^(1/8)), {q, 0, n}]; (* Michael Somos, Jul 01 2014 *)
Module[{tr=Accumulate[Range[20]]}, If[MemberQ[tr, #], 1, 0]&/@Range[Max[tr]]] (* Harvey P. Dale, Mar 13 2023 *)
PROG
(PARI) {a(n) = my(A); if( n<0, 0, A = x * O(x^n); polcoeff( eta(x^2 + A)^2 / eta(x + A), n))}; /* Michael Somos, Mar 14 2011 */
(PARI) {a(n) = issquare( 8*n + 1)}; /* Michael Somos, Apr 27 2000 */
(PARI) a(n) = ispolygonal(n, 3); \\ Michel Marcus, Jan 22 2015
(Haskell)
a010054 = a010052 . (+ 1) . (* 8)
a010054_list = concatMap (\x -> 1 : replicate x 0) [0..]
-- Reinhard Zumkeller, Feb 12 2012, Oct 22 2011, Apr 02 2011
(Magma) Basis( ModularForms( Gamma0(16), 1/2), 362) [2] ; /* Michael Somos, Jun 10 2014 */
(Python)
from sympy import integer_nthroot
def A010054(n): return int(integer_nthroot((n<<3)+1, 2)[1]) # Chai Wah Wu, Nov 15 2022
(Sage) # uses[EulerTransform from A166861]
b = BinaryRecurrenceSequence(-1, 0)
a = EulerTransform(b)
print([a(n) for n in range(88)]) # Peter Luschny, Nov 17 2022
(Clojure)
(def A010054 (mapcat #(cons 1 (replicate % 0)) (range))) ; Tony Zorman, Apr 03 2023
CROSSREFS
Number of ways of writing n as a sum of k triangular numbers, for k=1,...: A010054, A008441, A008443, A008438, A008439, A008440, A226252, A007331, A226253, A226254, A226255, A014787, A014809.
Cf. A106507 (reciprocal series).
KEYWORD
nonn,tabl,easy
EXTENSIONS
Additional comments from Michael Somos, Apr 27 2000
STATUS
approved
Visible parts of the perspective view of the stepped pyramid whose structure essentially arises after the 90-degree-zig-zag folding of the isosceles triangle A237593.
+10
157
1, 1, 1, 3, 2, 2, 2, 2, 2, 1, 1, 2, 7, 3, 1, 1, 3, 3, 3, 3, 2, 2, 3, 12, 4, 1, 1, 1, 1, 4, 4, 4, 4, 2, 1, 1, 2, 4, 15, 5, 2, 1, 1, 2, 5, 5, 3, 5, 5, 2, 2, 2, 2, 5, 9, 9, 6, 2, 1, 1, 1, 1, 2, 6, 6, 6, 6, 3, 1, 1, 1, 1, 3, 6, 28, 7, 2, 2, 1, 1, 2, 2, 7, 7, 7, 7, 3, 2, 1, 1, 2, 3, 7, 12, 12, 8, 3, 1, 2, 2, 1, 3, 8, 8, 8, 8, 8, 3, 2, 1, 1
OFFSET
1,4
COMMENTS
Also the rows of both triangles A237270 and A237593 interleaved.
Also, irregular triangle read by rows in which T(n,k) is the area of the k-th region (from left to right in ascending diagonal) of the n-th symmetric set of regions (from the top to the bottom in descending diagonal) in the two-dimensional diagram of the perspective view of the infinite stepped pyramid described in A245092 (see the diagram in the Links section).
The diagram of the symmetric representation of sigma is also the top view of the pyramid, see Links section. For more information about the diagram see also A237593 and A237270.
The number of cubes at the n-th level is also A024916(n), the sum of all divisors of all positive integers <= n.
Note that this pyramid is also a quarter of the pyramid described in A244050. Both pyramids have infinitely many levels.
Odd-indexed rows are also the rows of the irregular triangle A237270.
Even-indexed rows are also the rows of the triangle A237593.
Lengths of the odd-indexed rows are in A237271.
Lengths of the even-indexed rows give 2*A003056.
Row sums of the odd-indexed rows gives A000203, the sum of divisors function.
Row sums of the even-indexed rows give the positive even numbers (see A005843).
Row sums give A245092.
From the front view of the stepped pyramid emerges a geometric pattern which is related to A001227, the number of odd divisors of the positive integers.
The connection with the odd divisors of the positive integers is as follows: A261697 --> A261699 --> A237048 --> A235791 --> A237591 --> A237593 --> A237270 --> this sequence.
EXAMPLE
Irregular triangle begins:
1;
1, 1;
3;
2, 2;
2, 2;
2, 1, 1, 2;
7;
3, 1, 1, 3;
3, 3;
3, 2, 2, 3;
12;
4, 1, 1, 1, 1, 4;
4, 4;
4, 2, 1, 1, 2, 4;
15;
5, 2, 1, 1, 2, 5;
5, 3, 5;
5, 2, 2, 2, 2, 5;
9, 9;
6, 2, 1, 1, 1, 1, 2, 6;
6, 6;
6, 3, 1, 1, 1, 1, 3, 6;
28;
7, 2, 2, 1, 1, 2, 2, 7;
7, 7;
7, 3, 2, 1, 1, 2, 3, 7;
12, 12;
8, 3, 1, 2, 2, 1, 3, 8;
8, 8, 8;
8, 3, 2, 1, 1, 1, 1, 2, 3, 8;
31;
9, 3, 2, 1, 1, 1, 1, 2, 3, 9;
...
Illustration of the odd-indexed rows of triangle as the diagram of the symmetric representation of sigma which is also the top view of the stepped pyramid:
.
n A000203 A237270 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
1 1 = 1 |_| | | | | | | | | | | | | | | |
2 3 = 3 |_ _|_| | | | | | | | | | | | | |
3 4 = 2 + 2 |_ _| _|_| | | | | | | | | | | |
4 7 = 7 |_ _ _| _|_| | | | | | | | | |
5 6 = 3 + 3 |_ _ _| _| _ _|_| | | | | | | |
6 12 = 12 |_ _ _ _| _| | _ _|_| | | | | |
7 8 = 4 + 4 |_ _ _ _| |_ _|_| _ _|_| | | |
8 15 = 15 |_ _ _ _ _| _| | _ _ _|_| |
9 13 = 5 + 3 + 5 |_ _ _ _ _| | _|_| | _ _ _|
10 18 = 9 + 9 |_ _ _ _ _ _| _ _| _| |
11 12 = 6 + 6 |_ _ _ _ _ _| | _| _| _|
12 28 = 28 |_ _ _ _ _ _ _| |_ _| _|
13 14 = 7 + 7 |_ _ _ _ _ _ _| | _ _|
14 24 = 12 + 12 |_ _ _ _ _ _ _ _| |
15 24 = 8 + 8 + 8 |_ _ _ _ _ _ _ _| |
16 31 = 31 |_ _ _ _ _ _ _ _ _|
...
The above diagram arises from a simpler diagram as shown below.
Illustration of the even-indexed rows of triangle as the diagram of the deployed front view of the corner of the stepped pyramid:
.
Level _ _
1 _|1|1|_
2 _|2 _|_ 2|_
3 _|2 |1|1| 2|_
4 _|3 _|1|1|_ 3|_
5 _|3 |2 _|_ 2| 3|_
6 _|4 _|1|1|1|1|_ 4|_
7 _|4 |2 |1|1| 2| 4|_
8 _|5 _|2 _|1|1|_ 2|_ 5|_
9 _|5 |2 |2 _|_ 2| 2| 5|_
10 _|6 _|2 |1|1|1|1| 2|_ 6|_
11 _|6 |3 _|1|1|1|1|_ 3| 6|_
12 _|7 _|2 |2 |1|1| 2| 2|_ 7|_
13 _|7 |3 |2 _|1|1|_ 2| 3| 7|_
14 _|8 _|3 _|1|2 _|_ 2|1|_ 3|_ 8|_
15 _|8 |3 |2 |1|1|1|1| 2| 3| 8|_
16 |9 |3 |2 |1|1|1|1| 2| 3| 9|
...
The number of horizontal line segments in the n-th level in each side of the diagram equals A001227(n), the number of odd divisors of n.
The number of horizontal line segments in the left side of the diagram plus the number of the horizontal line segment in the right side equals A054844(n).
The total number of vertical line segments in the n-th level of the diagram equals A131507(n).
The diagram represents the first 16 levels of the pyramid.
The diagram of the isosceles triangle and the diagram of the top view of the pyramid shows the connection between the partitions into consecutive parts and the sum of divisors function (see also A286000 and A286001). - Omar E. Pol, Aug 28 2018
The connection between the isosceles triangle and the stepped pyramid is due to the fact that this object can also be interpreted as a pop-up card. - Omar E. Pol, Nov 09 2022
CROSSREFS
Famous sequences that are visible in the stepped pyramid:
Cf. A000040 (prime numbers)......., for the characteristic shape see A346871.
Cf. A000079 (powers of 2)........., for the characteristic shape see A346872.
Cf. A000203 (sum of divisors)....., total area of the terraces in the n-th level.
Cf. A000217 (triangular numbers).., for the characteristic shape see A346873.
Cf. A000225 (Mersenne numbers)...., for a visualization see A346874.
Cf. A000384 (hexagonal numbers)..., for the characteristic shape see A346875.
Cf. A000396 (perfect numbers)....., for the characteristic shape see A346876.
Cf. A000668 (Mersenne primes)....., for a visualization see A346876.
Cf. A001097 (twin primes)........., for a visualization see A346871.
Cf. A001227 (# of odd divisors)..., number of subparts in the n-th level.
Cf. A002378 (oblong numbers)......, for a visualization see A346873.
Cf. A008586 (multiples of 4)......, perimeters of the successive levels.
Cf. A008588 (multiples of 6)......, for the characteristic shape see A224613.
Cf. A013661 (zeta(2))............., (area of the horizontal faces)/(n^2), n -> oo.
Cf. A014105 (second hexagonals)..., for the characteristic shape see A346864.
Cf. A067742 (# of middle divisors), # cells in the main diagonal in n-th level.
Apart from zeta(2) other constants that are related to the stepped pyramid are A072691, A353908, A354238.
KEYWORD
nonn,tabf,look
AUTHOR
Omar E. Pol, Sep 26 2015
STATUS
approved
Inverse Möbius transform of A003961; a(n) = sigma(A003961(n)), where A003961 shifts the prime factorization of n one step towards the larger primes.
+10
86
1, 4, 6, 13, 8, 24, 12, 40, 31, 32, 14, 78, 18, 48, 48, 121, 20, 124, 24, 104, 72, 56, 30, 240, 57, 72, 156, 156, 32, 192, 38, 364, 84, 80, 96, 403, 42, 96, 108, 320, 44, 288, 48, 182, 248, 120, 54, 726, 133, 228, 120, 234, 60, 624, 112, 480, 144, 128, 62, 624, 68
OFFSET
1,2
COMMENTS
Sum of the divisors of the prime shifted n, or equally, sum of the prime shifted divisors of n. - Antti Karttunen, Aug 17 2020
FORMULA
Multiplicative with a(p^e) = (q^(e+1)-1)/(q-1) where q = nextPrime(p). - David W. Wilson, Sep 01 2001
From Antti Karttunen, Aug 06-12 2020: (Start)
a(n) = Sum_{d|n} A003961(d) = Sum_{d|A003961(n)} d.
a(n) = A000203(A003961(n)) = A000593(A003961(n)).
a(n) = 2*A336840(n) - A000005(n) = 2*Sum_{d|n} (A048673(d) - (1/2)).
a(n) = A008438(A108228(n)) = A008438(A048673(n)-1).
a(n) = A336838(n) * A336856(n).
a(n) is odd if and only if n is a square.
(End)
Sum_{k=1..n} a(k) ~ c * n^3, where c = (1/2) * Product_{p prime} p^3/((p+1)*(p^2-nextprime(p))) = 3.39513795..., where nextprime is A151800. - Amiram Eldar, Dec 08 2022
MATHEMATICA
b[1] = 1; b[p_?PrimeQ] := b[p] = Prime[ PrimePi[p] + 1]; b[n_] := b[n] = Times @@ (b[First[#]]^Last[#] &) /@ FactorInteger[n]; a[n_] := Sum[ b[d], {d, Divisors[n]}]; Table[a[n], {n, 1, 70}] (* Jean-François Alcover, Jul 18 2013 *)
PROG
(PARI) aPrime(p, e)=my(q=nextprime(p+1)); (q^(e+1)-1)/(q-1)
a(n)=my(f=factor(n)); prod(i=1, #f~, aPrime(f[i, 1], f[i, 2])) \\ Charles R Greathouse IV, Jul 18 2013
(PARI) A003973(n) = { my(f = factor(n)); for(i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); sigma(factorback(f)); }; \\ Antti Karttunen, Aug 06 2020
(Python)
from math import prod
from sympy import factorint, nextprime
def A003973(n): return prod(((q:=nextprime(p))**(e+1)-1)//(q-1) for p, e in factorint(n).items()) # Chai Wah Wu, Jul 05 2022
CROSSREFS
Cf. A000203, A000290 (positions of odd terms), A003961, A007814, A048673, A108228, A151800, A295664, A336840.
Permutation of A008438.
Used in the definitions of the following sequences: A326042, A336838, A336841, A336844, A336846, A336847, A336848, A336849, A336850, A336851, A336852, A336856, A336931, A336932.
Cf. also A003972.
KEYWORD
nonn,easy,mult
AUTHOR
EXTENSIONS
More terms from David W. Wilson, Aug 29 2001
Secondary name added by Antti Karttunen, Aug 06 2020
STATUS
approved
Number of ways of writing n as the sum of 2 triangular numbers.
+10
66
1, 2, 1, 2, 2, 0, 3, 2, 0, 2, 2, 2, 1, 2, 0, 2, 4, 0, 2, 0, 1, 4, 2, 0, 2, 2, 0, 2, 2, 2, 1, 4, 0, 0, 2, 0, 4, 2, 2, 2, 0, 0, 3, 2, 0, 2, 4, 0, 2, 2, 0, 4, 0, 0, 0, 4, 3, 2, 2, 0, 2, 2, 0, 0, 2, 2, 4, 2, 0, 2, 2, 0, 3, 2, 0, 0, 4, 0, 2, 2, 0, 6, 0, 2, 2, 0, 0, 2, 2, 0, 1, 4, 2, 2, 4, 0, 0, 2, 0, 2, 2, 2, 2, 0, 0
OFFSET
0,2
COMMENTS
Ramanujan theta functions: f(q) (see A121373), phi(q) (A000122), psi(q) (A010054), chi(q) (A000700). The present sequence gives the expansion coefficients of psi(q)^2.
Also the number of positive odd solutions to equation x^2 + y^2 = 8*n + 2. - Seiichi Manyama, May 28 2017
REFERENCES
B. C. Berndt, Ramanujan's Notebooks Part III, Springer-Verlag. See p. 139 Example (iv).
J. H. Conway and N. J. A. Sloane, "Sphere Packings, Lattices and Groups", Springer-Verlag, p. 102.
R. W. Gosper, Strip Mining in the Abandoned Orefields of Nineteenth Century Mathematics, in Computers in Mathematics (Ed. D. V. Chudnovsky and R. D. Jenks). New York: Dekker, 1990. See p. 279.
R. W. Gosper, Experiments and discoveries in q-trigonometry, in Symbolic Computation, Number Theory, Special Functions, Physics and Combinatorics. Editors: F. G. Garvan and M. E. H. Ismail. Kluwer, Dordrecht, Netherlands, 2001, pp. 79-105. [See Pi_q.]
P. A. MacMahon, Combinatory Analysis, Cambridge Univ. Press, London and New York, Vol. 1, 1915 and Vol. 2, 1916. See vol. 2, p 31, Article 272.
Ivan Niven, Herbert S. Zuckerman and Hugh L. Montgomery, An Introduction to the Theory Of Numbers, Fifth Edition, John Wiley and Sons, Inc., NY 1991, p. 165.
LINKS
M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, Tenth Printing, 1972, p. 575, 16.23.1 and 16.23.2.
R. P. Agarwal, Lambert series and Ramanujan, Prod. Indian Acad. Sci. (Math. Sci.), v. 103, n. 3, 1993, pp. 269-293 (see p. 285).
N. J. Fine, Basic Hypergeometric Series and Applications, Amer. Math. Soc., 1988; p. 72, Eq (31.2); p. 78, Eq. following (32.25).
J. W. L. Glaisher, On the function chi(n), Quarterly Journal of Pure and Applied Mathematics, 20 (1884), 97-167. See p. 108.
M. D. Hirschhorn, The number of representations of a number by various forms, Discrete Mathematics 298 (2005), 205-211.
N. Heninger, E. M. Rains and N. J. A. Sloane, On the Integrality of n-th Roots of Generating Functions, arXiv:math/0509316 [math.NT], 2005-2006; J. Combinatorial Theory, Series A, 113 (2006), 1732-1745.
Nicco, Conjectured identity of the product of two theta functions, Math Stackexchange, Sep 09 2015.
K. Ono, S. Robins and P. T. Wahl, On the representation of integers as sums of triangular numbers, Aequationes mathematicae, August 1995, Volume 50, Issue 1-2, pp. 73-94.
H. Rosengren, Sums of triangular numbers from the Frobenius determinant, arXiv:math/0504272 [math.NT], 2005.
Eric Weisstein's World of Mathematics, Ramanujan Theta Functions.
FORMULA
This sequence is the quadrisection of many sequences. Here are two examples:
a(n) = A002654(4n+1), the difference between the number of divisors of 4*n+1 of form 4*k+1 and the number of form 4*k-1. - David Broadhurst, Oct 20 2002
a(n) = b(4*n + 1), where b(n) is multiplicative and b(2^e) = 0^e, b(p^e) = (1 + (-1)^e) / 2 if p == 3 (mod 4), b(p^e) = e+1 if p == 1 (mod 4). - Michael Somos, Sep 14 2005
G.f.: (Sum_{k>=0} x^((k^2 + k)/2))^2 = (Sum_{k>=0} x^(k^2 + k)) * (Sum_{k in Z} x^(k^2)).
Expansion of Jacobi theta (theta_2(0, sqrt(q)))^2 / (4 * q^(1/4)).
Sum[d|(4n+1), (-1)^((d-1)/2) ].
Given g.f. A(x), then B(q) = q * A(q^4) satisfies 0 = f(B(q), B(q^2), B(q^4)) where f(u, v, w) = v^3 + 4 * v * w^2 - u^2 * w. - Michael Somos, Sep 14 2005
Given g.f. A(x), then B(q) = q * A(q^4) satisfies 0 = f(B(q), B(q^2), B(q^3), B(q^6)) where f(u1, u2, u3, u6) = u1 * u3 - (u2 - u6) * (u2 + 3*u6). - Michael Somos, Sep 14 2005
Expansion of Jacobi k/(4*q^(1/2)) * (2/Pi)* K(k) in powers of q^2. - Michael Somos, Sep 14 2005. Convolution of A001938 and A004018. This appears in the denominator of the Jacobi sn and cn formula given in the Abramowitz-Stegun reference, p. 575, 16.23.1 and 16.23.2, where m=k^2. - Wolfdieter Lang, Jul 05 2016
G.f.: Sum_{k>=0} a(k) * x^(2*k) = Sum_{k>=0} x^k / (1 + x^(2*k + 1)).
G.f.: Sum_{k in Z} x^k / (1 - x^(4*k + 1)). - Michael Somos, Nov 03 2005
Expansion of psi(x)^2 = phi(x) * psi(x^2) in powers of x where phi(), psi() are Ramanujan theta functions.
Moebius transform is period 8 sequence [ 1, -1, -1, 0, 1, 1, -1, 0, ...]. - Michael Somos, Jan 25 2008
G.f. is a period 1 Fourier series which satisfies f(-1 / (8 t)) = 1/2 (t/i) g(t) where q = exp(2 Pi i t) and g() is the g.f. for A104794.
Euler transform of period 2 sequence [ 2, -2, ...].
G.f.: q^(-1/4) * eta(q^2)^4 / eta(q)^2. See also the Fine reference.
a(n) = Sum_{k=0..n} A010054(k)*A010054(n-k). - Reinhard Zumkeller, Nov 03 2009
A004020(n) = 2 * a(n). A005883(n) = 4 * a(n).
Convolution square of A010054.
G.f.: Product_{k>0} (1 - x^(2*k))^2 / (1 - x^(2*k-1))^2.
a(2*n) = A113407(n). a(2*n + 1) = A053692(n). a(3*n) = A002175(n). a(3*n + 1) = 2 * A121444(n). a(9*n + 2) = a(n). a(9*n + 5) = a(9*n + 8) = 0. - Michael Somos, Jun 08 2014
G.f.: exp( Sum_{n>=1} 2*(x^n/n) / (1 + x^n) ). - Paul D. Hanna, Mar 01 2016
a(n) = A001826(2+8*n) - A001842(2+8*n), the difference between the number of divisors 1 (mod 4) and 3 (mod 4) of 2+8*n. See the Ono et al. link, Corollary 1, or directly the Niven et al. reference, p. 165, Corollary (3.23). - Wolfdieter Lang, Jan 11 2017
Expansion of continued fraction 1 / (1 - x^1 + x^1*(1 - x^1)^2 / (1 - x^3 + x^2*(1 - x^2)^2 / (1 - x^5 + x^3*(1 - x^3)^2 / ...))) in powers of x^2. - Michael Somos, Apr 20 2017
Given g.f. A(x), and B(x) is the g.f. for A079006, then B(x) = A(x^2) / A(x) and B(x) * B(x^2) * B(x^4) * ... = 1 / A(x). - Michael Somos, Apr 20 2017
a(0) = 1, a(n) = (2/n)*Sum_{k=1..n} A002129(k)*a(n-k) for n > 0. - Seiichi Manyama, May 06 2017
From Paul D. Hanna, Aug 10 2019: (Start)
G.f.: Sum_{n>=0} x^n * Sum_{k=0..n} binomial(n,k) * (x^(2*n+1) - x^(2*k))^(n-k) = Sum_{n>=0} a(n)*x^(2*n).
G.f.: Sum_{n>=0} x^n * Sum_{k=0..n} binomial(n,k) * (x^(2*n+1) + x^(2*k))^(n-k) * (-1)^k = Sum_{n>=0} a(n)*x^(2*n). (End)
From Peter Bala, Jan 05 2021: (Start)
G.f.: Sum_{n = -oo..oo} x^(4*n^2+2*n) * (1 + x^(4*n+1))/(1 - x^(4*n+1)). See Agarwal, p. 285, equation 6.20 with i = j = 1 and mu = 4.
For prime p of the form 4*k + 3, a(n*p^2 + (p^2 - 1)/4) = a(n).
If n > 0 and p are coprime then a(n*p + (p^2 - 1)/4) = 0. The proofs are similar to those given for the corresponding results for A115110. Cf. A000729.
For prime p of the form 4*k + 1 and for n not congruent to (p - 1)/4 (mod p) we have a(n*p^2 + (p^2 - 1)/4) = 3*a(n) (since b(n), where b(4*n+1) = a(n), is multiplicative). (End)
From Peter Bala, Mar 22 2021: (Start)
G.f. A(q) satisfies:
A(q^2) = Sum_{n = -oo..oo} q^n/(1 - q^(4*n+2)) (set z = q, alpha = q^2, mu = 4 in Agarwal, equation 6.15).
A(q^2) = Sum_{n = -oo..oo} q^(2*n)/(1 - q^(4*n+1)) (set z = q^2, alpha = q, mu = 4 in Agarwal, equation 6.15).
A(q^2) = Sum_{n = -oo..oo} q^n/(1 + q^(2*n+1))^2 = Sum_{n = -oo..oo} q^(3*n+1)/(1 + q^(2*n+1))^2. (End)
G.f.: Sum_{k>=0} a(k) * q^k = Sum_{k>=0} (-1)^k * q^(k*(k+1)) + 2 * Sum_{n>=1, k>=0} (-1)^k * q^(k*(k+2*n+1)+n). - Mamuka Jibladze, May 17 2021
G.f.: Sum_{k>=0} a(k) * q^k = Sum_{k>=0} (-1)^k * q^(k*(k+1)) * (1 + q^(2*k+1))/(1 - q^(2*k+1)). - Mamuka Jibladze, Jun 06 2021
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = Pi/2 (A019669). - Amiram Eldar, Oct 15 2022
EXAMPLE
G.f. = 1 + 2*x + x^2 + 2*x^3 + 2*x^4 + 3*x^6 + 2*x^7 + 2*x^9 + 2*x^10 + 2*x^11 + ...
G.f. for B(q) = q * A(q^4) = q + 2*q^5 + q^9 + 2*q^13 + 2*q^17 + 3*q^25 + 2*q^29 + 2*q^37 + 2*q^41 + ...
MAPLE
sigmamr := proc(n, m, r) local a, d ; a := 0 ; for d in numtheory[divisors](n) do if modp(d, m) = r then a := a+1 ; end if; end do: a; end proc:
A002654 := proc(n) sigmamr(n, 4, 1)-sigmamr(n, 4, 3) ; end proc:
A008441 := proc(n) A002654(4*n+1) ; end proc:
seq(A008441(n), n=0..90) ; # R. J. Mathar, Mar 23 2011
MATHEMATICA
Plus@@((-1)^(1/2 (Divisors[4#+1]-1)))& /@ Range[0, 104] (* Ant King, Dec 02 2010 *)
a[ n_] := SeriesCoefficient[ (1/2) EllipticTheta[ 2, 0, q] EllipticTheta[ 3, 0, q], {q, 0, n + 1/4}]; (* Michael Somos, Jun 19 2012 *)
a[ n_] := SeriesCoefficient[ (1/4) EllipticTheta[ 2, 0, q]^2, {q, 0, 2 n + 1/2}]; (* Michael Somos, Jun 19 2012 *)
a[ n_] := If[ n < 0, 0, DivisorSum[ 4 n + 1, (-1)^Quotient[#, 2] &]]; (* Michael Somos, Jun 08 2014 *)
QP = QPochhammer; s = QP[q^2]^4/QP[q]^2 + O[q]^100; CoefficientList[s, q] (* Jean-François Alcover, Nov 27 2015, adapted from PARI *)
TriangeQ[n_] := IntegerQ@Sqrt[8n +1]; Table[Count[FrobeniusSolve[{1, 1}, n], {__?TriangeQ}], {n, 0, 104}] (* Robert G. Wilson v, Apr 15 2017 *)
PROG
(PARI) {a(n) = if( n<1, n==0, polcoeff( sum(k=0, (sqrtint(8*n + 1) - 1)\2, x^(k * (k+1)/2), x * O(x^n))^2, n) )};
(PARI) {a(n) = if( n<0, 0, n = 4*n + 1; sumdiv(n, d, (-1)^(d\2)))}; /* Michael Somos, Sep 02 2005 */
(PARI) {a(n) = my(A); if( n<0, 0, A = x * O(x^n); polcoeff( eta(x^2 + A)^4 / eta(x + A)^2, n))};
(PARI) {a(n) = if( n<0, 0, n = 4*n + 1; sumdiv( n, d, (d%4==1) - (d%4==3)))}; /* Michael Somos, Sep 14 2005 */
(PARI) { my(q='q+O('q^166)); Vec(eta(q^2)^4 / eta(q)^2) } \\ Joerg Arndt, Apr 16 2017
(Sage) ModularForms( Gamma1(8), 1, prec=420).1; # Michael Somos, Jun 08 2014
(Haskell)
a052343 = (flip div 2) . (+ 1) . a008441
-- Reinhard Zumkeller, Jul 25 2014
(Magma) A := Basis( ModularForms( Gamma1(8), 1), 420); A[2]; /* Michael Somos, Jan 31 2015 */
CROSSREFS
Cf. A004020, A005883, A104794, A052343, A199015 (partial sums).
Number of ways of writing n as a sum of k triangular numbers, for k=1,...: A010054, A008441, A008443, A008438, A008439, A008440, A226252, A007331, A226253, A226254, A226255, A014787, A014809.
Cf. A274621 (reciprocal series).
KEYWORD
nonn,easy
EXTENSIONS
More terms and information from Michael Somos, Mar 23 2003
STATUS
approved
Sum of divisors d of n such that n/d is odd.
(Formerly M0937 N0351)
+10
54
1, 2, 4, 4, 6, 8, 8, 8, 13, 12, 12, 16, 14, 16, 24, 16, 18, 26, 20, 24, 32, 24, 24, 32, 31, 28, 40, 32, 30, 48, 32, 32, 48, 36, 48, 52, 38, 40, 56, 48, 42, 64, 44, 48, 78, 48, 48, 64, 57, 62, 72, 56, 54, 80, 72, 64, 80, 60, 60, 96, 62, 64, 104, 64, 84, 96, 68, 72, 96, 96, 72
OFFSET
1,2
COMMENTS
Glaisher calls this Delta'(n) or Delta'_1(n). - N. J. A. Sloane, Nov 24 2018
Equals row sums of triangle A143119. - Gary W. Adamson, Jul 26 2008
Cayley begins article 386 with "To find the value of A, = 8{q/(1-q)^2 + q^3/(1-q^3)^2 +&c.}," where A is 8 time the g.f. of this sequence. - Michael Somos, Aug 01 2011
a(n) = 2*(a(n-1) - a(n-4) + a(n-9) ... +- a(n-i^2) ...) up to the last positive number n - i^2, and if n is a square, then a(0) should be replaced by n/2 (cf. Halphen). - Michel Marcus, Oct 14 2012
From Omar E. Pol, Nov 26 2019: (Start)
a(n) is also the total number of odd parts in the partitions of n into equal parts.
a(n) = n iff n is a power of 2.
a(n) = n + 1 iff n is an odd prime. (End)
REFERENCES
A. Cayley, An Elementary Treatise on Elliptic Functions, G. Bell and Sons, London, 1895, p. 294, Art. 386.
G. Chrystal, Algebra: An elementary text-book for the higher classes of secondary schools and for colleges, 6th ed, Chelsea Publishing Co., New York 1959 Part II, p. 346 Exercise XXI(18). MR0121327 (22 #12066)
A. P. Prudnikov, Yu. A. Brychkov and O.I. Marichev, "Integrals and Series", Volume 1: "Elementary Functions", Chapter 4: "Finite Sums", New York, Gordon and Breach Science Publishers, 1986-1992, Eqs. (5.1.29.3), (5.1.29.9).
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).
LINKS
H. H. Chan and C. Krattenthaler, Recent progress in the study of representations of integers as sums of squares, arXiv:math/0407061 [math.NT], 2004.
J. W. L. Glaisher, On the representations of a number as the sum of two, four, six, eight, ten, and twelve squares, Quart. J. Math. 38 (1907), 1-62 (see p. 4 and p. 8).
G.-H. Halphen, Sur les sommes des diviseurs des nombres entiers et les décompositions en deux carrés, Bull. math. Soc. France, 6 (1877-1878), 119-120.
P. A. MacMahon, Divisors of numbers and their continuations in the theory of partitions, Proc. London Math. Soc., 19 (1921), 75-113.
FORMULA
Expansion of K(k^2) * (K(k^2) - E(k^2)) / (2 * Pi^2) in powers of q where q is Jacobi's nome and K(), E() are complete elliptic integrals. - Michael Somos, Aug 01 2011
Multiplicative with a(p^e) = p^e if p = 2; (p^(e+1)-1)/(p-1) if p > 2. - David W. Wilson, Aug 01 2001
a(n) = sigma(n) - sigma(n/2) for even n and = sigma(n) otherwise where sigma(n) is the sum of divisors of n (A000203). - Valery A. Liskovets, Apr 07 2002
G.f.: A(x) satisfies 0 = f(A(x), A(x^2), A(x^3), A(x^6)) where f(u1, u2, u3, u6) = 2*u1*u6 - u1*u3 - 10*u2*u6 + u2^2 + 2*u2*u3 + 9*u6^2. - Michael Somos, Apr 10 2005
G.f.: A(x) satisfies 0 = f(A(x), A(x^2), A(x^3), A(x^6)) where f(u1, u2, u3, u6) = (u2 - 3*u6)^2 - (u1 - 2*u2) * (u3 - 2*u6). - Michael Somos, Sep 06 2005
G.f.: Sum_{n>=1} n*x^n/(1-x^(2*n)). - Vladeta Jovovic, Oct 16 2002
G.f.: Sum_{k>0} x^(2*k - 1) / (1 - x^(2*k - 1))^2. - Michael Somos, Aug 17 2005
G.f.: (1/8) * theta_4''(0) / theta_4(0) = (Sum_{k>0} -(-1)^k * k^2 q^(k^2)) / (Sum_{k in Z} (-1)^k * q^(k^2)) where theta_4(u) is one of Jacobi's theta functions.
G.f.: A(q) = Z'(0) * K^2 / (2 * Pi^2) = (K - E) * K /(2 * Pi^2) where Z(u) is the Jacobi Zeta function and K, E are complete elliptic integrals. - Michael Somos, Sep 06 2005
Dirichlet g.f.: zeta(s) * zeta(s-1) * (1 - 1/2^s). - Michael Somos, Apr 05 2003
Moebius transform is A026741.
a(n) = n * Sum_{c|n} 1/c, where c are odd numbers (A005408) dividing n. a(n) = A069359(n) + n. a(n) = A000035(n) (*) A000027(n), where operation (*) denotes Dirichlet convolution, that is, convolution of type: a(n) = Sum_{d|n} b(d) * c(n/d) = Sum_{d|n} A000035(d) * A000027(n/d). -Jaroslav Krizek, Nov 07 2013
L.g.f.: Sum_{ k>0 } atanh(x^k) = Sum_{ n>0 } (a(n)/n)*x^n. - Benedict W. J. Irwin, Jul 05 2016
a(n) = A006519(n)*A000203(n/A006519(n)). - Robert Israel, Jul 05 2016
Sum_{k=1..n} a(k) ~ Pi^2 * n^2 /16. - Vaclav Kotesovec, Feb 01 2019
a(n) = (A000203(n) + A000593(n))/2. - Amiram Eldar, Aug 12 2019
From Peter Bala, Jan 06 2021: (Start)
G.f.: A(x) = (1/2)*Sum_{n = -oo..oo} x^(2*n+1)/(1 - x^(2*n+1))^2.
A(x) = Sum_{n = -oo..oo} x^(4*n+1)/(1 - x^(4*n+1))^2.
a(2*n) = 2*a(n); a(2*n+1) = A008438(n). (End)
Expansion of (-1/2) x (d phi(-x) / dx) / phi(-x) in powers of x where phi() is a Ramanujan theta function. - Michael Somos, Jul 01 2023
EXAMPLE
G.f. = q + 2*q^2 + 4*q^3 + 4*q^4 + 6*q^5 + 8*q^6 + 8*q^7 + 8*q^8 + 13*q^9 + ...
The divisors of 6 are 1, 2, 3, and 6. Only 6/2 and 6/6 are odd. Hence, a(6) = 2 + 6 = 8.
As 120 = 15 * 2^3 where 15 is odd and 2^3 is the largest power of 2 dividing 120, a(120) = sigma(15) * 2^3 = 24 * 8 = 192. - David A. Corneth, Aug 12 2019
For n = 6 the partitions of 6 into equal parts are [6], [3,3], [2,2,2], [1,1,1,1,1,1]. There are 8 odd parts, so a(6) = 8. - Omar E. Pol, Nov 26 2019
MAPLE
a:= proc(n) local e;
e:= 2^padic:-ordp(n, 2);
e*numtheory:-sigma(n/e)
end proc:
map(a, [$1..100]); # Robert Israel, Jul 05 2016
MATHEMATICA
a[n_]:=Total[Cases[Divisors[n], d_ /; OddQ[n/d]]]; Table[a[n], {n, 1, 71}] (* Jean-François Alcover, Mar 18 2011 *)
a[ n_] := If[ n < 1, 0, DivisorSum[n, # / GCD[#, 2] &]] (* Michael Somos, Aug 01 2011 *)
a[ n_] := With[{m = InverseEllipticNomeQ @ q}, SeriesCoefficient[ (1/8) EllipticK[ m] ( EllipticK[ m] - EllipticE[ m] ) / (Pi/2 )^2, {q, 0, n}]] (* Michael Somos, Aug 01 2011 *)
Table[Total[Select[Divisors[n], OddQ[n/#]&]], {n, 80}] (* Harvey P. Dale, Jun 05 2015 *)
a[ n_] := SeriesCoefficient[ With[ {m = InverseEllipticNomeQ[q]}, (1/2) (EllipticK[ m] / Pi)^2 (D[ JacobiZeta[ JacobiAmplitude[x, m], m], x] /. x -> 0)], {q, 0, n}]; (* Michael Somos, Mar 17 2017 *)
f[2, e_] := 2^e; f[p_, e_] := (p^(e+1)-1)/(p-1); a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Sep 21 2020 *)
PROG
(PARI) {a(n) = if( n<1, 0, direuler( p=2, n, (1 - (p<3) * X) / ((1 - X) * (1 - p*X))) [n])}; /* Michael Somos, Apr 05 2003 */
(PARI) {a(n) = if( n<1, 0, sumdiv( n, d, d / gcd(d, 2)))}; /* Michael Somos, Apr 05 2003 */
(PARI) a(n) = my(v = valuation(n, 2)); sigma(n>>v)<<v \\ David A. Corneth, Aug 12 2019
(Haskell)
a002131 n = sum [d | d <- [1..n], mod n d == 0, odd $ div n d]
-- Reinhard Zumkeller, Aug 14 2011
(Magma) [&+[d:d in Divisors(m)|IsOdd(Floor(m/d))] :m in [1..75]]; // Marius A. Burtea, Aug 12 2019
(Python)
from math import prod
from sympy import factorint
def A002131(n): return prod(p**e if p == 2 else (p**(e+1)-1)//(p-1) for p, e in factorint(n).items()) # Chai Wah Wu, Dec 17 2021
CROSSREFS
A diagonal of A060047. Bisection A008438.
KEYWORD
nonn,nice,easy,mult
STATUS
approved
Number of ordered ways of writing n as the sum of 3 triangular numbers.
+10
52
1, 3, 3, 4, 6, 3, 6, 9, 3, 7, 9, 6, 9, 9, 6, 6, 15, 9, 7, 12, 3, 15, 15, 6, 12, 12, 9, 12, 15, 6, 13, 21, 12, 6, 15, 9, 12, 24, 9, 18, 12, 9, 18, 15, 12, 13, 24, 9, 15, 24, 6, 18, 27, 6, 12, 15, 18, 24, 21, 15, 12, 27, 9, 13, 18, 15, 27, 27, 9, 12, 27, 15, 24, 21, 12, 15, 30, 15, 12
OFFSET
0,2
COMMENTS
Fermat asserted that every number is the sum of three triangular numbers. This was proved by Gauss, who recorded in his Tagebuch entry for Jul 10 1796 that: EYPHEKA! num = DELTA + DELTA + DELTA. See also Gauss, DA, art. 293.
Ramanujan theta functions: f(q) (see A121373), phi(q) (A000122), psi(q) (A010054), chi(q) (A000700).
Andrews (2016), Theorem 2, shows that A008443(n) = A290735(n) + A290737(n) + A290739(n). = N. J. A. Sloane, Aug 10 2017
REFERENCES
J. H. Conway and N. J. A. Sloane, "Sphere Packings, Lattices and Groups", Springer-Verlag, p. 102.
C. F. Gauss, Disquisitiones Arithmeticae, Yale University Press, 1966, New Haven and London, p. 342, art. 293.
M. Nathanson, Additive Number Theory: The Classical Bases, Graduate Texts in Mathematics, Volume 165, Springer-Verlag, 1996. See Chapter 1.
LINKS
N. J. A. Sloane, Table of n, a(n) for n = 0..20000 (first 5050 terms from T. D. Noe)
George E. Andrews, EYPHKA! num = Delta + Delta + Delta, J. Number Theory 23 (1986), 285-293. [The Y in the title is really the Greek letter Upsilon and Delta is really the Greek letter of that name.]
M. Doring, J. Haidenbauer, U.-G. Meissner, and A. Rusetsky, Dynamical coupled-channel approaches on a momentum lattice, arXiv preprint arXiv:1108.0676 [hep-lat], 2011.
M. D. Hirschhorn and J. A. Sellers, Partitions into three triangular numbers, Australasian Journal of Combinatorics, Volume 30 (2004), Pages 307-318; Submission.
M. D. Hirschhorn and J. A. Sellers, On Representations Of A Number As A Sum Of Three Triangles, Acta Arithmetica 77 (1996), 289-301.
K. Ono, S. Robins, and P. T. Wahl, On the representation of integers as sums of triangular numbers, Aequationes mathematicae, August 1995, Volume 50, Issue 1-2, pp 73-94.
Eric Weisstein's World of Mathematics, Ramanujan Theta Functions.
FORMULA
Expansion of Jacobi theta constant theta_2^3 /8. G.f. is cube of g.f. for A010054.
Expansion of psi(q)^3 in powers of q where psi() is a Ramanujan theta function (A010054). - Michael Somos, Oct 25 2006
Expansion of q^(-3/8) * (eta(q^2)^2 / eta(q))^3 in powers of q. - Michael Somos, May 29 2012
Euler transform of period 2 sequence [ 3, -3, ...]. - Michael Somos, Oct 25 2006
G.f. is a period 1 Fourier series which satisfies f(-1 / (16 t)) = 2^(-3/2) (t/i)^(3/2) g(t) where q = exp(2 Pi i t) and g() is the g.f. for A213384. - Michael Somos, Jun 23 2012
a(3*n) = A213627(n). a(3*n + 1) = 3 * A213617(n). a(3*n + 2) = A181648(n). - Michael Somos, Jun 23 2012
G.f.: (Sum_{k>0} x^((k^2 - k)/2))^3 = (Product_{k>0} (1 + x^k) * (1 - x^(2*k)))^3. - Michael Somos, May 29 2012
a(n) = A005869(n)/2 = A005886(n)/4 = A005878(n)/8.
a(n) = A005875(8*n+3)/8. See, e.g., the Ono et al. link: The case k=3. - Wolfdieter Lang, Jan 12 2017
a(0) = 1, a(n) = (3/n)*Sum_{k=1..n} A002129(k)*a(n-k) for n > 0. - Seiichi Manyama, May 06 2017
EXAMPLE
5 can be written as 3+1+1, 1+3+1, 1+1+3, so a(5) = 3.
G.f. = 1 + 3*x + 3*x^2 + 4*x^3 + 6*x^4 + 3*x^5 + 6*x^6 + 9*x^7 + 3*x^8 + ...
G.f. = q^3 + 3*q^11 + 3*q^19 + 4*q^27 + 6*q^35 + 3*q^43 + 6*q^51 + 9*q^59 + 3*q^67 + ...
MAPLE
s1 := sum(q^(n*(n+1)/2), n=0..30): s2 := series(s1^3, q, 250): for i from 0 to 200 do printf(`%d, `, coeff(s2, q, i)) od:
MATHEMATICA
s1 = Sum[q^(n (n + 1)/2), {n, 0, 12}]; s2 = Series[s1^3, {q, 0, 80}]; CoefficientList[s2, q] (* Jean-François Alcover, Oct 04 2011, after Maple *)
a[ n_] := SeriesCoefficient[ (1/8) EllipticTheta[ 2, 0, q]^3, {q, 0, 2 n + 3/4}]; (* Michael Somos, May 29 2012 *)
QP = QPochhammer; CoefficientList[(QP[q^2]^2/QP[q])^3 + O[q]^80, q] (* Jean-François Alcover, Nov 24 2015 *)
PROG
(PARI) {a(n) = if( n<0, 0, polcoeff( sum(k=0, (sqrtint(8*n + 1) - 1)\2, x^((k^2 + k)/2), x * O(x^n))^3, n))}; /* Michael Somos, Oct 25 2006 */
(PARI) {a(n) = my(A); if( n<0, 0, A = x * O(x^n); polcoeff( (eta(x^2 + A)^2 / eta(x + A))^3, n))}; /* Michael Somos, Oct 25 2006 */
(Magma) Basis( ModularForms( Gamma0(16), 3/2), 630)[4]; /* Michael Somos, Aug 26 2015 */
CROSSREFS
Number of ways of writing n as a sum of k triangular numbers, for k=1,...: A010054, A008441, A008443, A008438, A008439, A008440,A226252, A007331, A226253, A226254, A226255, A014787, A014809.
Partial sums are in A038835.
KEYWORD
nonn,easy,look,nice
EXTENSIONS
More terms from James A. Sellers, Feb 07 2001
STATUS
approved
Fourier coefficients of E_{infinity,4}.
(Formerly M4503)
+10
41
0, 1, 8, 28, 64, 126, 224, 344, 512, 757, 1008, 1332, 1792, 2198, 2752, 3528, 4096, 4914, 6056, 6860, 8064, 9632, 10656, 12168, 14336, 15751, 17584, 20440, 22016, 24390, 28224, 29792, 32768, 37296, 39312, 43344, 48448, 50654, 54880, 61544, 64512
OFFSET
0,3
COMMENTS
E_{infinity,4} is the unique normalized weight-4 modular form for Gamma_0(2) with simple zeros at i*infinity. Since this has level 2, it is not a cusp form, in contrast to A002408.
a(n+1) is the number of representations of n as a sum of 8 triangular numbers (from A000217). See the Ono et al. link, Theorem 5.
Ramanujan theta functions: f(q) (see A121373), phi(q) (A000122), psi(q) (A010054), chi(q) (A000700).
a(n) gives the sum of cubes of divisors d of n such that n/d is odd. This is called sigma^#_3(n) in the Ono et al. link. See a formula below. - Wolfdieter Lang, Jan 12 2017
REFERENCES
B. C. Berndt, Ramanujan's Notebooks Part III, Springer-Verlag, see p. 139, Ex (ii).
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
LINKS
Seiichi Manyama, Table of n, a(n) for n = 0..10000 (terms 0..1001 from T. D. Noe)
B. Brent, Quadratic Minima and Modular Forms, Experimental Mathematics, v.7 no.3, 257-274.
H. H. Chan and C. Krattenthaler, Recent progress in the study of representations of integers as sums of squares, arXiv:math/0407061 [math.NT], 2004.
J. H. Conway and N. J. A. Sloane, Sphere Packings, Lattices and Groups, Springer-Verlag, p. 187.
J. W. L. Glaisher, On the representations of a number as the sum of two, four, six, eight, ten, and twelve squares, Quart. J. Math. 38 (1907), 1-62 (see p. 4 and p. 8).
Masao Koike, Modular forms on non-compact arithmetic triangle groups, Unpublished manuscript [Extensively annotated with OEIS A-numbers by N. J. A. Sloane, Feb 14 2021. I wrote 2005 on the first page but the internal evidence suggests 1997.]
K. Ono, S. Robins and P. T. Wahl, On the representation of integers as sums of triangular numbers, Aequationes mathematicae, August 1995, Volume 50, Issue 1-2, pp 73-94. Theorem 5.
H. Rosengren, Sums of triangular numbers from the Frobenius determinant, arXiv:math/0504272 [math.NT], 2005.
FORMULA
G.f.: q * Product_{k>=1} (1-q^k)^8 * (1+q^k)^16. - corrected by Vaclav Kotesovec, Oct 14 2015
a(n) = Sum_{0<d|n, n/d odd} d^3. [Glaisher]
G.f.: Sum_{n>0} n^3*x^n/(1-x^(2*n)). - Vladeta Jovovic, Oct 24 2002
Expansion of Jacobi theta constant theta_2(q)^8 / 256 in powers of q.
Expansion of eta(q^2)^16 / eta(q)^8 in powers of q. - Michael Somos, May 31 2005
Expansion of x * psi(x)^8 in powers of x where psi() is a Ramanujan theta function. - Michael Somos, Jan 15 2012
Expansion of (Q(x) - Q(x^2)) / 240 in powers of x where Q() is a Ramanujan Lambert series. - Michael Somos, Jan 15 2012
Expansion of E_{gamma,2}^2 * E_{0,4} in powers of q.
Euler transform of period 2 sequence [8, -8, ...]. - Michael Somos, May 31 2005
G.f. A(x) satisfies 0 = f(A(x), A(x^2), A(x^4)) where f(u, v, w) = v^3 - u^2*w + 16*u*v*w - 32*v^2*w + 256*v*w^2. - Michael Somos, May 31 2005
G.f. is a period 1 Fourier series which satisfies f(-1 / (2 t)) = 16^(-1) (t / i)^4 g(t) where q = exp(2 Pi i t) and g() is the g.f. for A035016. - Michael Somos, Jan 11 2009
Multiplicative with a(2^e) = 2^(3e), a(p^e) = (p^(3(e+1))-1)/(p^3-1). - Mitch Harris, Jun 13 2005
Dirichlet convolution of A154955 by A001158. Dirichlet g.f. zeta(s)*zeta(s-3)*(1-1/2^s). - R. J. Mathar, Mar 31 2011
A002408(n) = -(-1)^n * a(n).
Convolution square of A008438. - Michael Somos, Jun 15 2014
a(1) = 1, a(n) = (8/(n-1))*Sum_{k=1..n-1} A002129(k)*a(n-k) for n > 0. - Seiichi Manyama, May 06 2017
Sum_{k=1..n} a(k) ~ c * n^4, where c = Pi^4/384 = 0.253669... (A222072). - Amiram Eldar, Oct 19 2022
EXAMPLE
G.f. = q + 8*q^2 + 28*q^3 + 64*q^4 + 126*q^5 + 224*q^6 + 344*q^7 + 512*q^8 + ...
MAPLE
nmax:=40: seq(coeff(series(x*(product((1-x^k)^8*(1+x^k)^16, k=1..nmax)), x, n+1), x, n), n=0..nmax); # Vaclav Kotesovec, Oct 14 2015
MATHEMATICA
Prepend[Table[Plus @@ (Select[Divisors[k + 1], OddQ[(k + 1)/#] &]^3), {k, 0, 39}], 0] (* Ant King, Dec 04 2010 *)
a[ n_] := SeriesCoefficient[ EllipticTheta[ 2, 0, q^(1/2)]^8 / 256, {q, 0, n}]; (* Michael Somos, Jun 04 2013 *)
a[ n_] := If[ n < 1, 0, Sum[ d^3 Boole[ OddQ[ n/d]], {d, Divisors[ n]}]]; (* Michael Somos, Jun 04 2013 *)
f[n_] := Total[(2n/Select[ Divisors[ 2n], Mod[#, 4] == 2 &])^3]; Flatten[{0, Array[f, 40] }] (* Robert G. Wilson v, Mar 26 2015 *)
nmax=60; CoefficientList[Series[x*Product[(1-x^k)^8 * (1+x^k)^16, {k, 1, nmax}], {x, 0, nmax}], x] (* Vaclav Kotesovec, Oct 14 2015 *)
QP = QPochhammer; s = q * (QP[-1, q]/2)^16 * QP[q]^8 + O[q]^50; CoefficientList[s, q] (* Jean-François Alcover, Dec 01 2015, adapted from PARI *)
PROG
(PARI) {a(n) = if( n<1, 0, sumdiv( n, d, (n/d%2) * d^3))}; /* Michael Somos, May 31 2005 */
(PARI) {a(n) = local(A); if( n<1, 0, n--; A = x * O(x^n); polcoeff( (eta(x^2 + A)^2 / eta(x + A))^8, n))}; /* Michael Somos, May 31 2005 */
(PARI) a(n)=my(e=valuation(n, 2)); 8^e * sigma(n/2^e, 3) \\ Charles R Greathouse IV, Sep 09 2014
(Sage) ModularForms( Gamma0(2), 4, prec=33).1; # Michael Somos, Jun 04 2013
(Magma) Basis( ModularForms( Gamma0(2), 4), 10) [2]; /* Michael Somos, May 27 2014 */
(Python)
from sympy import divisors
def a(n):
return 0 if n == 0 else sum(((n//d)%2)*d**3 for d in divisors(n))
print([a(n) for n in range(101)]) # Indranil Ghosh, Jun 24 2017
CROSSREFS
Number of ways of writing n as a sum of k triangular numbers, for k=1,...: A010054, A008441, A008443, A008438, A008439, A008440, A226252, A007331, A226253, A226254, A226255, A014787, A014809, A076577.
KEYWORD
easy,nice,nonn,mult
EXTENSIONS
Additional comments from Barry Brent (barryb(AT)primenet.com)
Wrong Maple program replaced by Vaclav Kotesovec, Oct 14 2015
a(0)=0 prepended by Vaclav Kotesovec, Oct 14 2015
STATUS
approved
Number of divisors of 2*n-1.
+10
38
1, 2, 2, 2, 3, 2, 2, 4, 2, 2, 4, 2, 3, 4, 2, 2, 4, 4, 2, 4, 2, 2, 6, 2, 3, 4, 2, 4, 4, 2, 2, 6, 4, 2, 4, 2, 2, 6, 4, 2, 5, 2, 4, 4, 2, 4, 4, 4, 2, 6, 2, 2, 8, 2, 2, 4, 2, 4, 6, 4, 3, 4, 4, 2, 4, 2, 4, 8, 2, 2, 4, 4, 4, 6, 2, 2, 6, 4, 2, 4, 4, 2, 8, 2, 3, 6, 2, 6, 4, 2, 2, 4, 4, 4, 8, 2, 2, 8, 2, 2, 4, 4, 4, 6, 4
OFFSET
1,2
LINKS
FORMULA
G.f.: Sum_{k>0} x^k/(1-x^(2*k-1)). - Michael Somos, Sep 02 2006
G.f.: sum(k>=1, x^((2*k-1)^2/2+1/2) * (1+x^(2*k-1))/(1-x^(2*k-1)) ). - Joerg Arndt, Nov 08 2010
Dirichlet g.f. (with interpolated zeros): zeta(s)^2*(1-1/2^s)^2. - Geoffrey Critzer, Feb 15 2015
Sum_{k=1..n} a(k) ~ (n*log(n) + (2*gamma - 1 + 3*log(2))*n)/2, where gamma is Euler's constant (A001620). - Amiram Eldar, Nov 27 2022
EXAMPLE
a(5)=3 because the divisors of 9 are: 1, 3 and 9.
MAPLE
with(numtheory): seq(tau(2*n-1), n=1..120);
MATHEMATICA
nn = 200;
f[list_, i_] := list[[i]]; a =Table[Boole[OddQ[n]], {n, 1, nn}]; Select[Table[DirichletConvolve[f[a, n], f[a, n], n, m], {m, 1, nn}], # > 0 &] (* Geoffrey Critzer, Feb 15 2015 *)
Table[DivisorSigma[0, 2*n-1], {n, 1, 100}] (* Vaclav Kotesovec, Jan 14 2019 *)
PROG
(PARI) {a(n)=if(n<1, 0, numdiv(2*n-1))} /* Michael Somos, Sep 03 2006 */
(Haskell)
a099774 = a000005 . a005408 -- Reinhard Zumkeller, Sep 22 2014
(Magma) [NumberOfDivisors(2*n+1): n in [0..100]]; // Vincenzo Librandi, Mar 18 2015
(GAP) List([1..120], n->Tau(2*n-1)); # Muniru A Asiru, Dec 21 2018
CROSSREFS
Bisection of A000005.
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Nov 19 2004
EXTENSIONS
More terms from Emeric Deutsch, Dec 03 2004
STATUS
approved
Sum of divisors of 2*n.
+10
32
3, 7, 12, 15, 18, 28, 24, 31, 39, 42, 36, 60, 42, 56, 72, 63, 54, 91, 60, 90, 96, 84, 72, 124, 93, 98, 120, 120, 90, 168, 96, 127, 144, 126, 144, 195, 114, 140, 168, 186, 126, 224, 132, 180, 234, 168, 144, 252, 171, 217, 216, 210, 162, 280, 216, 248, 240, 210
OFFSET
1,1
COMMENTS
a(n) is also the total number of parts in all partitions of 2*n into equal parts. - Omar E. Pol, Feb 14 2021
LINKS
N. J. A. Sloane, Table of n, a(n) for n = 1..20000 [First 1000 terms from Harry J. Smith]
FORMULA
a(n) = A000203(2*n). - R. J. Mathar, Apr 06 2011
a(n) = A000203(n) + A054785(n). - R. J. Mathar, May 19 2020
From Vaclav Kotesovec, Aug 07 2022: (Start)
Dirichlet g.f.: zeta(s) * zeta(s-1) * (3 - 2^(1-s)).
Sum_{k=1..n} a(k) ~ 5 * Pi^2 * n^2 / 24. (End)
From Miles Wilson, Sep 30 2024: (Start)
G.f.: Sum_{k>=1} k*x^(k/gcd(k, 2))/(1 - x^(k/gcd(k, 2))).
G.f.: Sum_{k>=1} k*x^(2*k/(3 + (-1)^k))/(1 - x^(2*k/(3 + (-1)^k))). (End)
MATHEMATICA
lst={}; Do[AppendTo[lst, DivisorSigma[1, n]], {n, 2, 6!, 2}]; lst (* Vladimir Joseph Stephan Orlovsky, Sep 20 2008 *)
DivisorSigma[1, 2*Range[60]] (* Harvey P. Dale, Jun 08 2022 *)
PROG
(PARI) vector(66, n, sigma(2*n, 1))
(PARI) for (n=1, 1000, write("b062731.txt", n, " ", sigma(2*n)) ) \\ Harry J. Smith, Aug 09 2009
(MuPAD) numlib::sigma(2*n)$ n=0..81 // Zerinvary Lajos, May 13 2008
(Magma) [SumOfDivisors(2*n): n in [1..70]]; // Vincenzo Librandi, Oct 31 2014
CROSSREFS
Sigma(k*n): A000203 (k=1), A144613 (k=3), A193553 (k=4, even bisection), A283118 (k=5), A224613 (k=6), A283078 (k=7), A283122 (k=8), A283123 (k=9).
Cf. A008438, A074400, A182818, A239052 (odd bisection), A326124 (partial sums), A054784, A215947, A336923, A346870, A346878, A346880, A355750.
Row 2 of A319526. Column & Row 2 of A216626. Row 1 of A355927.
Shallow diagonal (2n,n) of A265652. See also A244658.
KEYWORD
easy,nonn,changed
AUTHOR
Jason Earls, Jul 11 2001
EXTENSIONS
Zero removed and offset corrected by Omar E. Pol, Jul 17 2009
STATUS
approved

Search completed in 0.050 seconds