login
Search: a139601 -id:a139601
     Sort: relevance | references | number | modified | created      Format: long | short | data
Square array T(n,k) = n*(k-1)*k/2+k, of nonnegative numbers together with polygonal numbers, read by antidiagonals upwards.
+10
49
0, 0, 1, 0, 1, 2, 0, 1, 3, 3, 0, 1, 4, 6, 4, 0, 1, 5, 9, 10, 5, 0, 1, 6, 12, 16, 15, 6, 0, 1, 7, 15, 22, 25, 21, 7, 0, 1, 8, 18, 28, 35, 36, 28, 8, 0, 1, 9, 21, 34, 45, 51, 49, 36, 9, 0, 1, 10, 24, 40, 55, 66, 70, 64, 45, 10, 0, 1, 11, 27, 46, 65, 81, 91, 92, 81, 55, 11
OFFSET
0,6
COMMENTS
A general formula for polygonal numbers is P(n,k) = (n-2)*(k-1)*k/2 + k, where P(n,k) is the k-th n-gonal number.
The triangle sums, see A180662 for their definitions, link this square array read by antidiagonals with twelve different sequences, see the crossrefs. Most triangle sums are linear sums of shifted combinations of a sequence, see e.g. A189374. - Johannes W. Meijer, Apr 29 2011
LINKS
Peter Luschny, Figurate number — a very short introduction. With plots from Stefan Friedrich Birkner.
Omar E. Pol, Polygonal numbers, An alternative illustration of initial terms.
FORMULA
T(n,k) = n*(k-1)*k/2+k.
T(n,k) = A057145(n+2,k). - R. J. Mathar, Jul 28 2016
From Stefano Spezia, Apr 12 2024: (Start)
G.f.: y*(1 - x - y + 2*x*y)/((1 - x)^2*(1 - y)^3).
E.g.f.: exp(x+y)*y*(2 + x*y)/2. (End)
EXAMPLE
The square array of nonnegatives together with polygonal numbers begins:
=========================================================
....................... A A . . A A A A
....................... 0 0 . . 0 0 1 1
....................... 0 0 . . 1 1 3 3
....................... 0 0 . . 6 7 9 9
....................... 0 0 . . 9 3 6 6
....................... 0 1 . . 5 2 0 0
....................... 4 2 . . 7 9 6 7
=========================================================
Nonnegatives . A001477: 0, 1, 2, 3, 4, 5, 6, 7, ...
Triangulars .. A000217: 0, 1, 3, 6, 10, 15, 21, 28, ...
Squares ...... A000290: 0, 1, 4, 9, 16, 25, 36, 49, ...
Pentagonals .. A000326: 0, 1, 5, 12, 22, 35, 51, 70, ...
Hexagonals ... A000384: 0, 1, 6, 15, 28, 45, 66, 91, ...
Heptagonals .. A000566: 0, 1, 7, 18, 34, 55, 81, 112, ...
Octagonals ... A000567: 0, 1, 8, 21, 40, 65, 96, 133, ...
9-gonals ..... A001106: 0, 1, 9, 24, 46, 75, 111, 154, ...
10-gonals .... A001107: 0, 1, 10, 27, 52, 85, 126, 175, ...
11-gonals .... A051682: 0, 1, 11, 30, 58, 95, 141, 196, ...
12-gonals .... A051624: 0, 1, 12, 33, 64, 105, 156, 217, ...
...
=========================================================
The column with the numbers 2, 3, 4, 5, 6, ... is formed by the numbers > 1 of A000027. The column with the numbers 3, 6, 9, 12, 15, ... is formed by the positive members of A008585.
MAPLE
T:= (n, k)-> n*(k-1)*k/2+k:
seq(seq(T(d-k, k), k=0..d), d=0..14); # Alois P. Heinz, Oct 14 2018
MATHEMATICA
T[n_, k_] := (n + 1)*(k - 1)*k/2 + k; Table[T[n - k - 1, k], {n, 0, 11}, {k, 0, n}] // Flatten (* Robert G. Wilson v, Jul 12 2009 *)
PROG
(Python)
def A139600Row(n):
x, y = 1, 1
yield 0
while True:
yield x
x, y = x + y + n, y + n
for n in range(8):
R = A139600Row(n)
print([next(R) for _ in range(11)]) # Peter Luschny, Aug 04 2019
(Magma)
T:= func< n, k | k*(n*(k-1)+2)/2 >;
A139600:= func< n, k | T(n-k, k) >;
[A139600(n, k): k in [0..n], n in [0..12]]; // G. C. Greubel, Jul 12 2024
(SageMath)
def T(n, k): return k*(n*(k-1)+2)/2
def A139600(n, k): return T(n-k, k)
flatten([[A139600(n, k) for k in range(n+1)] for n in range(13)]) # G. C. Greubel, Jul 12 2024
CROSSREFS
A formal extension negative n is in A326728.
Triangle sums (see the comments): A055795 (Row1), A080956 (Row2; terms doubled), A096338 (Kn11, Kn12, Kn13, Fi1, Ze1), A002624 (Kn21, Kn22, Kn23, Fi2, Ze2), A000332 (Kn3, Ca3, Gi3), A134393 (Kn4), A189374 (Ca1, Ze3), A011779 (Ca2, Ze4), A101357 (Ca4), A189375 (Gi1), A189376 (Gi2), A006484 (Gi4). - Johannes W. Meijer, Apr 29 2011
Sequences of m-gonal numbers: A000217 (m=3), A000290 (m=4), A000326 (m=5), A000384 (m=6), A000566 (m=7), A000567 (m=8), A001106 (m=9), A001107 (m=10), A051682 (m=11), A051624 (m=12), A051865 (m=13), A051866 (m=14), A051867 (m=15), A051868 (m=16), A051869 (m=17), A051870 (m=18), A051871 (m=19), A051872 (m=20), A051873 (m=21), A051874 (m=22), A051875 (m=23), A051876 (m=24), A255184 (m=25), A255185 (m=26), A255186 (m=27), A161935 (m=28), A255187 (m=29), A254474 (m=30).
KEYWORD
nonn,tabl,easy
AUTHOR
Omar E. Pol, Apr 27 2008
EXTENSIONS
Edited by Omar E. Pol, Jan 05 2009
STATUS
approved
Period 4: repeat [0, 0, 1, 1].
+10
33
0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1
OFFSET
0,1
COMMENTS
Decimal expansion of 1/909.
Lexicographically earliest de Bruijn sequence for n = 2 and k = 2.
Except for first term, binary expansion of the decimal number 1/10 = 0.000110011001100110011... in base 2. - Benoit Cloitre, May 18 2002
Content of #2 binary placeholder when n is converted from decimal to binary. a(n) = n*(n-1)/2 mod 2. Example: a(7) = 1 since 7 in binary is 1 -1- 1 and (7*6/2) mod 2 = 1. - Anne M. Donovan (anned3005(AT)aol.com), Sep 15 2003
Expansion in any base b of 1/((b-1)*(b^2+1)) = 1/(b^3-b^2+b-1). E.g., 1/5 in base 2, 1/20 in base 3, 1/51 in base 4, etc. - Franklin T. Adams-Watters, Nov 07 2006
Except for first term, parity of the triangular numbers A000217. - Omar E. Pol, Jan 17 2012
Except for first term, more generally: 1) Parity of the k-polygonal numbers, if k is odd (Cf. A139600, A139601). 2) Parity of the generalized k-gonal numbers, for even k >= 6. - Omar E. Pol, Feb 05 2012
Except for first term, parity of Recamán's sequence A005132. - Omar E. Pol, Apr 13 2012
Inverse binomial transform of A000749(n+1). - Wesley Ivan Hurt, Dec 30 2015
Least significant bit of tribonacci numbers (A000073). - Andres Cicuttin, Apr 04 2016
FORMULA
From Paul Barry, Aug 30 2004: (Start)
G.f.: x^2*(1 + x)/(1 - x^4).
a(n) = 1/2 - cos(Pi*n/2)/2 - sin(Pi*n/2)/2.
a(n) = a(n-1) - a(n-2) + a(n-3) for n > 2. (End)
a(n+2) = Sum_{k=0..n} b(k), with b(k) = A056594(k) (partial sums of S(n,x) Chebyshev polynomials at x=0).
a(n) = -a(n-2) + 1, for n >= 2 with a(0) = a(1) = 0.
G.f.: x^2/((1 - x)*(1 + x^2)) = x^2/(1 - x + x^2 - x^3).
From Jaume Oliver Lafont, Dec 05 2008: (Start)
a(n) = 1/2 - sin((2n+1)*Pi/4)/sqrt(2).
a(n) = 1/2 - cos((2n-1)*Pi/4)/sqrt(2). (End)
a(n) = floor((n mod 4)/2). - Reinhard Zumkeller, Apr 15 2011
Euler transform of length 4 sequence [1, -1, 0, 1]. - Michael Somos, Feb 28 2014
a(1-n) = a(n) for all n in Z. - Michael Somos, Feb 28 2014
From Wesley Ivan Hurt, Jul 22 2016: (Start)
a(n) = a(n-4) for n > 3.
a(n) = A133872(n+2).
a(n) + a(n+1) = A007877(n). (End)
E.g.f.: (exp(x) - sin(x) - cos(x))/2. - Ilya Gutkovskiy, Jul 11 2016
a(n) = (1 - (-1)^(n*(n-1)/2))/2. - Guenther Schrack, Feb 28 2019
EXAMPLE
G.f. = x^2 + x^3 + x^6 + x^7 + x^10 + x^11 + x^14 + x^15 + x^18 + x^19 + ...;
1/909 = 0.001100110011001 ...
MAPLE
A021913:=n->floor((n mod 4)/2); seq(A021913(n), n=0..100); # Wesley Ivan Hurt, Feb 28 2014
MATHEMATICA
Table[Floor[Mod[n, 4]/2], {n, 0, 100}] (* Wesley Ivan Hurt, Feb 28 2014 *)
a[ n_] := Mod[ Quotient[ n, 2], 2]; (* Michael Somos, Feb 28 2014 *)
LinearRecurrence[{1, -1, 1}, {0, 0, 1}, 100] (* Ray Chandler, Aug 25 2015 *)
CoefficientList[Series[x^2(1+x)/(1-x^4), {x, 0, 100}], x] (* Vincenzo Librandi, Dec 31 2015 *)
(1-(-1)^Binomial[Range[0, 100], 2])/2 (* G. C. Greubel, Apr 03 2019 *)
PROG
(PARI) {a(n) = n \ 2 % 2}; /* Michael Somos, Feb 28 2014 */
(PARI) x='x+O('x^99); concat([0, 0], Vec(x^2/(1-x+x^2-x^3))) \\ Altug Alkan, Apr 04 2016
(Magma) &cat [[0, 0, 1, 1]^^30]; // Vincenzo Librandi, Dec 31 2015
KEYWORD
nonn,cons,easy
EXTENSIONS
Chebyshev comment from Wolfdieter Lang, Sep 10 2004
STATUS
approved
Rectangular array T(k,n) of polygonal numbers, by antidiagonals.
+10
20
1, 3, 1, 6, 4, 1, 10, 9, 5, 1, 15, 16, 12, 6, 1, 21, 25, 22, 15, 7, 1, 28, 36, 35, 28, 18, 8, 1, 36, 49, 51, 45, 34, 21, 9, 1, 45, 64, 70, 66, 55, 40, 24, 10, 1, 55, 81, 92, 91, 81, 65, 46, 27, 11, 1, 66, 100, 117, 120, 112, 96, 75, 52, 30, 12, 1, 78, 121, 145, 153, 148, 133, 111
OFFSET
1,2
COMMENTS
The antidiagonal sums 1, 4, 11, 25, 50, ... are the numbers A006522(n) for n >= 3.
This is the accumulation array (cf. A144112) of A144257 (which is the weight array of this sequence). - Clark Kimberling, Sep 16 2008
By rows, the sequence beginning (1, N, ...) is the binomial transform of (1, (N-1), (N-2), 0, 0, 0, ...); and is the second partial sum of (1, (N-2), (N-2), (N-2), ...). Example: The sequence (1, 4, 9, 16, 25, ...) is the binomial transform of (1, 3, 2, 0, 0, 0, ...) and the second partial sum of (1, 2, 2, 2, ...). - Gary W. Adamson, Aug 23 2015
REFERENCES
Albert H. Beiler, Recreations in the theory of numbers, New York, Dover, (2nd ed.) 1966. See Table 76 at p. 189.
David Wells, The Penguin Dictionary of Curious and Interesting Numbers. Penguin Books, NY, 1986, Revised edition 1987. See p. 123.
LINKS
Clark Kimberling and John E. Brown, Partial Complements and Transposable Dispersions, J. Integer Seqs., Vol. 7, 2004.
FORMULA
T(n, k) = n*binomial(k, 2) + k = A057145(n+2,k).
2*T(n, k) = T(n+r, k) + T(n-r, k), where r = 0, 1, 2, 3, ..., n-1 (see table in Example field). - Bruno Berselli, Dec 19 2014
From Stefano Spezia, Sep 02 2022: (Start)
G.f.: x*y*(1 - x + x*y)/((1 - x)^2*(1 - y)^3).
G.f. of k-th column: k*(1 + k - 2*x)*x/(2*(1 - x)^2). (End)
EXAMPLE
First 6 rows:
=========================================
n\k| 1 2 3 4 5 6 7
---|-------------------------------------
1 | 1 3 6 10 15 21 28 ... (A000217, triangular numbers)
2 | 1 4 9 16 25 36 49 ... (A000290, squares)
3 | 1 5 12 22 35 51 70 ... (A000326, pentagonal numbers)
4 | 1 6 15 28 45 66 91 ... (A000384, hexagonal numbers)
5 | 1 7 18 34 55 81 112 ... (A000566, heptagonal numbers)
6 | 1 8 21 40 65 96 133 ... (A000567, octagonal numbers)
...
The array formed by the complements: A183225.
MATHEMATICA
t[n_, k_] := n*Binomial[k, 2] + k; Table[ t[k, n - k + 1], {n, 12}, {k, n}] // Flatten
PROG
(Magma) T:=func<h, i | h*Binomial(i, 2)+i>; [T(k, n-k+1): k in [1..n], n in [1..12]]; // Bruno Berselli, Dec 19 2014
KEYWORD
nonn,easy,tabl
AUTHOR
Clark Kimberling, Jul 14 2003
EXTENSIONS
Extended by Clark Kimberling, Jan 01 2011
STATUS
approved
Number of ways to represent n as a polygonal number.
+10
13
1, 1, 1, 2, 1, 1, 2, 2, 1, 2, 1, 1, 3, 2, 1, 2, 1, 1, 3, 2, 1, 2, 2, 1, 2, 3, 1, 2, 1, 1, 2, 2, 2, 4, 1, 1, 2, 2, 1, 2, 1, 1, 4, 2, 1, 2, 2, 1, 3, 2, 1, 2, 3, 1, 2, 2, 1, 2, 1, 1, 2, 3, 2, 4, 1, 1, 2, 3, 1, 2, 1, 1, 3, 2, 1, 3, 1, 1, 4, 2, 1, 2, 2, 1, 2, 2, 1, 2, 3, 2, 2, 2, 2, 3, 1, 1, 2, 3
OFFSET
3,4
COMMENTS
Frequency of n in the array A139601 or A086270 of polygonal numbers.
Since n is always n-gonal number, a(n) >= 1.
Conjecture: Every positive integer appears in the sequence.
Records of 2, 3, 4, 5, ... are reached at n = 6, 15, 36, 225, 561, 1225, ... see A063778. [R. J. Mathar, Aug 15 2010]
REFERENCES
J. J. Tattersall, Elementary Number Theory in Nine chapters, 2nd ed (2005), Cambridge Univ. Press, page 22 Problem 26, citing Wertheim (1897)
LINKS
E. Deza and M. Deza, Figurate Numbers, World Scientific, 2012; see p. 45.
FORMULA
a(n) = A129654(n) - 1.
G.f.: x * Sum_{k>=2} x^k / (1 - x^(k*(k + 1)/2)) (conjecture). - Ilya Gutkovskiy, Apr 09 2020
MAPLE
A177025 := proc(p)
local ii, a, n, s, m ;
ii := 2*p ;
a := 0 ;
for n in numtheory[divisors](ii) do
if n > 2 then
s := ii/n ;
if (s-2) mod (n-1) = 0 then
a := a+1 ;
end if;
end if;
end do:
return a;
end proc: # R. J. Mathar, Jan 10 2013
MATHEMATICA
nn = 100; t = Table[0, {nn}]; Do[k = 2; While[p = k*((n - 2) k - (n - 4))/2; p <= nn, t[[p]]++; k++], {n, 3, nn}]; t (* T. D. Noe, Apr 13 2011 *)
Table[Length[Intersection[Divisors[2 n - 2] + 1, Divisors[2 n]]] - 1, {n, 3, 100}] (* Jonathan Sondow, May 09 2014 *)
PROG
(PARI) a(n) = sum(i=3, n, ispolygonal(n, i)); \\ Michel Marcus, Jul 08 2014
(Python)
from sympy import divisors
def a(n):
i=2*n
x=0
for d in divisors(i):
if d>2:
s=i/d
if (s - 2)%(d - 1)==0: x+=1
return x # Indranil Ghosh, Apr 28 2017, translated from Maple code by R. J. Mathar
KEYWORD
nonn
AUTHOR
Vladimir Shevelev, May 01 2010
EXTENSIONS
Extended by R. J. Mathar, Aug 15 2010
STATUS
approved
Integers n for which f = (4^n - 2^n + 8n^2 - 2) / (2n * (2n + 1)) is an integer.
+10
10
3, 11, 23, 83, 131, 179, 191, 239, 243, 251, 359, 419, 431, 443, 491, 659, 683, 719, 743, 891, 911, 1019, 1031, 1103, 1223, 1439, 1451, 1499, 1511, 1539, 1559, 1583, 1811, 1931, 2003, 2039, 2063, 2211, 2339, 2351, 2399, 2459, 2511, 2543, 2699, 2819, 2903
OFFSET
1,1
COMMENTS
Superset of A002515; 2n + 1 is prime. A recursive search for members of this sequence results in the infinite series of very large primes A145918. Most members of this sequence are also prime, but five members less than 10000 are composite:
.. . 243 = 3^5
.. . 891 = 3^4 * 11
. . 1539 = 3^4 * 19
. . 2211 = 3 * 11 * 67
. . 2511 = 3^4 * 31
The polygonal number with f sides of length 2n + 1 is (2^n - 1)(2^(n - 1)).
Contribution from Reikku Kulon, May 19 2009: (Start)
The average difference between successive composite terms gradually increases, remaining near their order of magnitude. Roughly 3% of all primes less than 20 billion belong to this sequence or the 2n + 1 sequence. The interval between composite terms 12228632879 and 13169544651 contains 1113606 primes, accounting for 2.75% of the primes in the interval and 1.42% of the primes between 24457265759 and 26339089303.
Prime factors are most often congruent to 3 (mod 4), but some factors are congruent to 1 (mod 4), especially when a term has an even number of not necessarily distinct factors. The most common factor is 3, and often a large power of 3 is a divisor. 5, 7, 13, and 17 are never factors.
The ones digit of composite terms is most often 1, and becomes progressively more likely to be 1. It is never 5. It cannot be 7, because 2n + 1 would then be divisible by 5. The lack of solutions with n divisible by 5 appears crucial to the consistent primality of 2n + 1.
The tens digit is odd if the ones digit is 1 or 9; it is even if the ones digit is 3. This is a consequence of congruence to 3 (mod 4).
The most common least significant two digits of composite terms are 51.
The least significant digits of prime terms do not follow an obvious distribution.
This is the simplest and possibly most productive member of a family of similar sequences defined by f = (s + 8n^2 - 2) / (2n * (2n + 1)), where s is pronic. For these sequences, 2n + 1 is dominated by primes.
=====================================
Large sequences of consecutive primes
=====================================
. Initial term Primes Predecessor Successor Gap
. ---------------------------------------------------------------
. 1529648303 157285 1529648231 1639846391 110198160
. 3832649339 473045 3832647111 4193496803 360849692
. 5897103683 411434 5897102751 6223464171 326361420
. 6543227423 445293 6543226251 6899473631 356247380
. 8126586971 913506 8126586711 8871331491 744744780
. 9533381219 689395 9533380131 10103115231 569735100
. 11576086883 708712 11576086731 12171829419 595742688
. 12228633251 1113606 12228632879 13169544651 940911772
. 21315457451 2328623 21315457251 23375077119 2059619868
(End)
LINKS
Mario Raso, Integer Sequences in Cryptography: A New Generalized Family and its Application, Ph. D. Thesis, Univ. Bari (Italy 2025). See p. 112.
EXAMPLE
ngon(f, k) = k * (f * (k - 1) / 2 - k + 2)
. . . 3 = (4^3 - 2^3 + 8 * 9 - 2) / (6 * 7)
. . . . = (2 * 28 + 70) / 42
. . 126 = (2 * 28 + 70)
.. . 28 = (2^3 - 1) * 2^2
. . . . = 126 - 70 - 28
. . . . = 7 * (18 - 10 - 4)
. . . . = 7 * (3 * 6 - 3 * 3 - 5)
. . . . = 7 * (3 * 3 - 7 + 2)
.. 8287 = (4^11 - 2^11 + 8 * 121 - 2) / (22 * 23)
. . . . = (2 * 2096128 + 966) / 506
4193222 = (2 * 2096128 + 966)
2096128 = (2^11 - 1) * 2^10
. . . . = 4193222 - 2096128 - 966
. . . . = 23 * (182314 - 91136 - 42)
. . . . = 23 * (8287 * 22 - 8287 * 11 - 21)
. . . . = 23 * (8287 * 11 - 23 + 2)
Coincidentally, 8287 = 129 * 64 + 31 = 257 * 32 + 63 is prime, and may be the largest value of f that is.
1031 = 257 * 4 + 3 and 2063 = 1031 * 2 + 1 are both members of this sequence, 4127 = 2063 * 2 + 1 is prime, and 8287 = (4127 + 16) * 2 + 1.
PROG
(Haskell)
a158034 n = a158034_list !! (n-1)
a158034_list = [x | x <- [1..],
(4^x - 2^x + 8*x^2 - 2) `mod` (2*x*(2*x + 1)) == 0]
-- Reinhard Zumkeller, Jan 12 2014
CROSSREFS
Cf. A002515 (Lucasian primes)
Cf. A145918 (exponential Sophie Germain primes)
Cf. A139601 (polygonal numbers)
Cf. A046318, A139876 (related to composite members 243, 891, 1539, and 2511)
Cf. A060210, A002034, A109833, A136801 (their factors)
Cf. A039506 (3, 8287)
Cf. A006516 (2^n - 1)(2^(n - 1))
Cf. A000051 (Fermat numbers), A019434 (Fermat primes)
Cf. A142291 (prime sequence 257, 1031, 2063, 4127)
Cf. A235540 (nonprimes), A002943.
KEYWORD
easy,nonn
AUTHOR
Reikku Kulon, Mar 11 2009
STATUS
approved
a(n) is the smallest solution x to A176774(x)=n; a(n)=0 if this equation has no solution.
+10
9
3, 4, 5, 0, 7, 8, 24, 27, 11, 33, 13, 14, 42, 88, 17, 165, 19, 20, 60, 63, 23, 69, 72, 26, 255, 160, 29, 87, 31, 32, 315, 99, 102, 208, 37, 38, 114, 805, 41, 123, 43, 44, 132, 268, 47, 696, 475, 50, 150, 304, 53, 159, 162, 56, 168, 340, 59, 177, 61, 62, 615, 1309, 192, 388
OFFSET
3,1
COMMENTS
A greedy inverse function to A176774.
Conjecture: For every n >= 4, except for n=6, there exists an n-gonal number N which is not k-gonal for 3 <= k < n.
This means that the sequence contains only one 0: a(6)=0. For n=6 it is easy to prove that every hexagonal number (A000384) is also triangular (A000217), i.e., N does not exist. - Vladimir Shevelev, Apr 30 2010
FORMULA
a(p) = p if p is any odd prime.
EXAMPLE
For n=9, 24 is a nonagonal number, but not an octagonal number, heptagonal number, hexagonal number, etc. The smaller nonagonal number 9 is also a square number. Thus, a(9) = 24. - Michael B. Porter, Jul 16 2016
MAPLE
A139601 := proc(k, n) option remember ; n/2*( (k-2)*n-k+4) ; end proc:
A176774 := proc(n) option remember ; local k, m, pol ; for k from 3 do for m from 0 do pol := A139601(k, m) ; if pol = n then return k ; elif pol > n then break; end if; end do: end do: end proc:
A176948 := proc(n) if n = 6 then 0; else for x from 3 do if A176774(x)= n then return x ; end if; end do: end if; end proc:
seq(A176948(n), n=3..80) ; # R. J. Mathar, May 03 2010
MATHEMATICA
A176774[n_] := A176774[n] = (m = 3; While[Reduce[k >= 1 && n == k (k (m - 2) - m + 4)/2, k, Integers] == False, m++]; m); a[6] = 0; a[p_?PrimeQ] := p; a[n_] := (x = 3; While[A176774[x] != n, x++]; x); Table[an = a[n]; Print["a(", n, ") = ", an]; an, {n, 3, 100}] (* Jean-François Alcover, Sep 04 2016 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Vladimir Shevelev, Apr 29 2010
EXTENSIONS
More terms from R. J. Mathar, May 03 2010
STATUS
approved
Irregular triangle read by rows: T(n,k) is the sum of the subparts of the ziggurat diagram of n (described in A347186) that arise from the (2*k-1)-th double-staircase of the double-staircases diagram of n (described in A335616), n >= 1, k >= 1, and the first element of column k is in row A000384(k).
+10
9
1, 4, 6, 16, 12, 36, 1, 20, 0, 64, 0, 30, 6, 90, 0, 42, 0, 144, 17, 56, 0, 156, 0, 72, 34, 1, 256, 0, 0, 90, 0, 0, 324, 10, 0, 110, 0, 0, 400, 0, 8, 132, 70, 0, 342, 0, 0, 156, 0, 0, 576, 121, 0, 182, 0, 25, 462, 0, 0, 210, 102, 0, 784, 0, 0, 1, 240, 0, 0, 0, 900, 24, 52, 0, 272, 0, 0, 0
OFFSET
1,2
COMMENTS
Conjecture 1: the number of nonzero terms in row n equals A082647(n).
Conjecture 2: column k lists positive integers interleaved with 2*k+2 zeros.
The subparts of the ziggurat diagram are the polygons formed by the cells that are under the staircases.
The connection of the subparts of the ziggurat diagram with the polygonal numbers is as follows:
The area under a double-staircase labeled with the number j is equal to the m-th (j+2)-gonal number plus the (m-1)-th (j+2)-gonal number, where m is the number of steps on one side of the ladder from the base to the top.
The area under a simple-staircase labeled with the number j is equal to the m-th (j+2)-gonal number, where m is the number of steps.
So the k-th column of the triangle is related to the (2*k+1)-gonal numbers, for example:
For the calculation of column 1 we use triangular numbers A000217.
For the calculation of column 2 we use pentagonal numbers A000326.
For the calculation of column 3 we use heptagonal numbers A000566.
For the calculation of column 4 we use enneagonal numbers A001106.
And so on.
More generally, for the calculation of column k we use the (2*k+1)-gonal numbers.
For further information about the ziggurat diagram see A347186.
EXAMPLE
Triangle begins:
n / k 1 2 3 4
------------------------------
1 | 1;
2 | 4;
3 | 6;
4 | 16;
5 | 12;
6 | 36, 1;
7 | 20, 0;
8 | 64, 0;
9 | 30, 6;
10 | 90, 0;
11 | 42, 0;
12 | 144, 17;
13 | 56, 0;
14 | 156, 0;
15 | 72, 34, 1;
16 | 256, 0, 0;
17 | 90, 0, 0;
18 | 324, 10, 0;
19 | 110, 0 0;
20 | 400, 0, 8;
21 | 132, 70, 0;
22 | 342, 0, 0;
23 | 156, 0, 0;
24 | 576, 121, 0;
25 | 182, 0, 25;
26 | 462, 0, 0;
27 | 210, 102, 0;
28 | 784, 0, 0, 1;
...
For n = 15 the calculation of the 15th row of the triangle (in accordance with the geometric algorithm described in A347186) is as follows:
Stage 1 (Construction):
We draw the diagram called "double-staircases" with 15 levels described in A335616.
Then we label the five double-staircases (j = 1..5) as shown below:
_
_| |_
_| _ |_
_| | | |_
_| _| |_ |_
_| | _ | |_
_| _| | | |_ |_
_| | | | | |_
_| _| _| |_ |_ |_
_| | | _ | | |_
_| _| | | | | |_ |_
_| | _| | | |_ | |_
_| _| | | | | |_ |_
_| | | _| |_ | | |_
_| _| _| | _ | |_ |_ |_
|_ _ _ _ _ _ _ _|_ _ _|_ _|_|_|_|_ _|_ _ _|_ _ _ _ _ _ _ _|
1 2 3 4 5
.
Stage 2 (Debugging):
We remove the fourth double-staircase as it does not have at least one step at level 1 of the diagram starting from the base, as shown below:
_
_| |_
_| _ |_
_| | | |_
_| _| |_ |_
_| | _ | |_
_| _| | | |_ |_
_| | | | | |_
_| _| _| |_ |_ |_
_| | | | | |_
_| _| | | |_ |_
_| | _| |_ | |_
_| _| | | |_ |_
_| | | | | |_
_| _| _| _ |_ |_ |_
|_ _ _ _ _ _ _ _|_ _ _|_ _ _|_|_ _ _|_ _ _|_ _ _ _ _ _ _ _|
1 2 3 5
.
Stage 3 (Annihilation):
We delete the second double-staircase and the steps of the first double-staircase that are just above the second double-staircase.
The new diagram has two double-staircases and two simple-staircases as shown below:
_
| |
_ | | _
_| | _| |_ | |_
_| | | | | |_
_| | | | | |_
_| | _| |_ | |_
_| | | | | |_
_| | | | | |_
_| | _| _ |_ | |_
|_ _ _ _ _ _ _ _|_ _ _|_ _ _|_|_ _ _|_ _ _|_ _ _ _ _ _ _ _|
1 3 5
.
The diagram is called "ziggurat of 15".
Now we calculate the area (or the number of cells) under the staircases with multiplicity using polygonal numbers as shown below:
The area under the staircase labeled 1 is equal to A000217(8) = 36. There is a pair of these staircases, so T(15,1) = 2*36 = 72.
The area under the double-staircase labeled 3 is equal to A000326(4) + A000326(3) = 22 + 12 = 34, so T(15,2) = 34.
The area under the double-staircase labeled 5 is equal to A000566(1) + A000566(0) = 1 + 0 = 1, so T(15,3) = 1.
Therefore the 15th row of the triangle is [72, 34, 1].
CROSSREFS
Row sums give A347186.
Row n has length A351846(n).
Cf. A347529 (analog for the symmetric representation of sigma).
KEYWORD
nonn,tabf
AUTHOR
Omar E. Pol, Sep 05 2021
STATUS
approved
Numbers that have exactly 26 representations as a k-gonal number, P(n,k) = n*((k-2)*n - (k-4))/2, k and n >= 3.
+10
6
1559439365121, 2468046593376, 7760419091425
OFFSET
1,1
EXAMPLE
a(1): 1559439365121 has representations P(n,k) = P(3, 519813121708)=P(6, 103962624343)=P(9, 43317760144)=P(11, 28353443004)=P(18, 10192414153)=P(27, 4442847196)=P(33, 2953483648)=P(57, 977092336)=P(66, 727011361)=P(69, 664722664)=P(81, 481308448)=P(86, 426659199)=P(129, 188885584)=P(131, 183140268)=P(171, 107288572)=P(209, 71744544)=P(237, 55761976)=P(414, 18240979)=P(473, 13969968)=P(513, 11874388)=P(711, 6178324)=P(729, 5876784)=P(1881, 881968)=P(3537, 249376)=P(16899, 10924)=P(720981, 8).
a(2): 2468046593376 has representations P(n,k) = P(3, 822682197793)=P(6, 164536439560)=P(12, 37394645356)=P(18, 16131023488)=P(24, 8942197804)=P(26, 7593989520)=P(39, 3330697159)=P(42, 2866488496)=P(56, 1602627660)=P(72, 965589436)=P(84, 707988124)=P(96, 541238290)=P(116, 370021980)=P(126, 313402744)=P(392, 32204796)=P(416, 28591830)=P(576, 14903665)=P(647, 11809911)=P(783, 8061483)=P(936, 5640220)=P(1827, 1479601)=P(2912, 582306)=P(4302, 266776)=P(5823, 145603)=P(7056, 99160)=P(145551, 235).
a(3): 7760419091425 has representations P(n,k) = P(5, 776041909144)=P(7, 369543766260)=P(10, 172453757589)=P(13, 99492552456)=P(19, 45382567788)=P(25, 25868063640)=P(35, 13042721164)=P(37, 11652280920)=P(49, 6598995828)=P(55, 5225871444)=P(65, 3730970719)=P(82, 2336771785)=P(143, 764347396)=P(145, 743335164)=P(154, 658723293)=P(205, 371134344)=P(290, 185190769)=P(325, 147396376)=P(475, 68935548)=P(1225, 10351368)=P(1378, 8179601)=P(1729, 5194893)=P(2755, 2045644)=P(7585, 269814)=P(1969825, 6)=P(3939649, 3).
PROG
(PARI) See Hugh Erling, Oct 29 2018 link.
CROSSREFS
A subsequence of A090466.
KEYWORD
nonn,more,bref
AUTHOR
Hugh Erling, Oct 24 2018
STATUS
approved
Square array T(n,k) = (n - 2)*(k - 1)*k/2 + k, with n >= 0, k >= 0, read by antidiagonals upwards.
+10
5
0, 0, 1, 0, 1, 0, 0, 1, 1, -3, 0, 1, 2, 0, -8, 0, 1, 3, 3, -2, -15, 0, 1, 4, 6, 4, -5, -24, 0, 1, 5, 9, 10, 5, -9, -35, 0, 1, 6, 12, 16, 15, 6, -14, -48, 0, 1, 7, 15, 22, 25, 21, 7, -20, -63, 0, 1, 8, 18, 28, 35, 36, 28, 8, -27, -80, 0, 1, 9, 21, 34, 45, 51, 49, 36, 9, -35, -99, 0, 1, 10, 24, 40, 55, 66
OFFSET
0,10
COMMENTS
Note that the formula gives several kinds of numbers, for example:
Row 0 gives 0 together with A258837.
Row 1 gives 0 together with A080956.
Row 2 gives A001477, the nonnegative numbers.
For n >= 3, row n gives the n-gonal numbers (see Crossrefs section).
LINKS
Omar E. Pol, Polygonal numbers.
University of Surrey, Dept. of Mathematics, Polygonal Numbers - or Numbers as Shapes.
Eric Weisstein's World of Mathematics, Figurate Number.
Eric Weisstein's World of Mathematics, Polygonal Number.
Wikipedia, Polygonal number.
FORMULA
T(n,k) = A139600(n-2,k) if n >= 2.
T(n,k) = A139601(n-3,k) if n >= 3.
EXAMPLE
Array begins:
------------------------------------------------------------------------
n\k Numbers Seq. No. 0 1 2 3 4 5 6 7 8
------------------------------------------------------------------------
0 ............ (A258837): 0, 1, 0, -3, -8, -15, -24, -35, -48, ...
1 ............ (A080956): 0, 1, 1, 0, -2, -5, -9, -14, -20, ...
2 Nonnegatives A001477: 0, 1, 2, 3, 4, 5, 6, 7, 8, ...
3 Triangulars A000217: 0, 1, 3, 6, 10, 15, 21, 28, 36, ...
4 Squares A000290: 0, 1, 4, 9, 16, 25, 36, 49, 64, ...
5 Pentagonals A000326: 0, 1, 5, 12, 22, 35, 51, 70, 92, ...
6 Hexagonals A000384: 0, 1, 6, 15, 28, 45, 66, 91, 120, ...
7 Heptagonals A000566: 0, 1, 7, 18, 34, 55, 81, 112, 148, ...
8 Octagonals A000567: 0, 1, 8, 21, 40, 65, 96, 133, 176, ...
9 9-gonals A001106: 0, 1, 9, 24, 46, 75, 111, 154, 204, ...
10 10-gonals A001107: 0, 1, 10, 27, 52, 85, 126, 175, 232, ...
11 11-gonals A051682: 0, 1, 11, 30, 58, 95, 141, 196, 260, ...
12 12-gonals A051624: 0, 1, 12, 33, 64, 105, 156, 217, 288, ...
13 13-gonals A051865: 0, 1, 13, 36, 70, 115, 171, 238, 316, ...
14 14-gonals A051866: 0, 1, 14, 39, 76, 125, 186, 259, 344, ...
15 15-gonals A051867: 0, 1, 15, 42, 82, 135, 201, 280, 372, ...
...
CROSSREFS
Column 0 gives A000004.
Column 1 gives A000012.
Column 2 gives A001477, which coincides with the row numbers.
Main diagonal gives A060354.
Row 0 gives 0 together with A258837.
Row 1 gives 0 together with A080956.
Row 2 gives A001477, the same as column 2.
For n >= 3, row n gives the n-gonal numbers: A000217 (n=3), A000290 (n=4), A000326 (n=5), A000384 (n=6), A000566 (n=7), A000567 (n=8), A001106 (n=9), A001107 (n=10), A051682 (n=11), A051624 (n=12), A051865 (n=13), A051866 (n=14), A051867 (n=15), A051868 (n=16), A051869 (n=17), A051870 (n=18), A051871 (n=19), A051872 (n=20), A051873 (n=21), A051874 (n=22), A051875 (n=23), A051876 (n=24), A255184 (n=25), A255185 (n=26), A255186 (n=27), A161935 (n=28), A255187 (n=29), A254474 (n=30).
Cf. A303301 (similar table but with generalized polygonal numbers).
KEYWORD
sign,tabl,easy
AUTHOR
Omar E. Pol, Aug 09 2018
STATUS
approved
Numbers that have exactly 5 representations as a k-gonal number, P(n,k) = n*((k-2)*n - (k-4))/2, k and n >= 3.
+10
5
561, 1485, 1701, 2016, 2556, 2601, 2850, 3025, 3060, 3256, 3321, 4186, 4761, 4851, 5226, 5320, 5565, 5841, 6175, 6216, 6336, 6525, 6670, 7425, 7821, 7840, 8001, 8100, 8625, 8646, 9730, 9856, 9945, 9976, 10116, 10296, 10450, 10585, 11025, 11305, 11340, 12025, 12090
OFFSET
1,1
COMMENTS
n | 2*m where m is a term in this sequence. - David A. Corneth, Oct 29 2018
LINKS
Hugh Erling, Python code
EXAMPLE
561 has representations P(3, 188)=P(6, 39)=P(11, 12)=P(17, 6)=P(33, 3).
1485 has representations P(3, 496)=P(5, 150)=P(9, 43)=P(15, 16)=P(54, 3).
1701 has representations P(3, 568)=P(6, 115)=P(9, 49)=P(18, 13)=P(21, 10).
PROG
(PARI) isok(n) = sum(k=3, n-1, ispolygonal(n, k)) == 5; \\ Michel Marcus, Oct 29 2018
(PARI) is(n) = my(d=divisors(n<<1)); sum(i=2, #d, k=2*(d[i]^2 - 2 * d[i] + n) / (d[i] - 1) / d[i]; k == k\1 && min(d[i], k) >=3) == 5 \\ David A. Corneth, Oct 29 2018
KEYWORD
nonn
AUTHOR
Hugh Erling, Oct 28 2018
STATUS
approved

Search completed in 0.017 seconds