cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Previous Showing 21-25 of 25 results.

A339010 a(n) is the number of ways to write n as the difference of two centered k-gonal numbers for k >= 3.

Original entry on oeis.org

0, 0, 1, 1, 1, 2, 1, 2, 3, 2, 1, 5, 1, 2, 5, 3, 1, 6, 1, 5, 5, 2, 1, 8, 3, 2, 6, 5, 1, 10, 1, 4, 5, 2, 5, 12, 1, 2, 5, 8, 1, 10, 1, 5, 12, 2, 1, 11, 3, 6, 5, 5, 1, 12, 5, 8, 5, 2, 1, 19, 1, 2, 12, 5, 5, 10, 1, 5, 5, 10, 1, 18, 1, 2, 12, 5, 5, 10, 1, 11, 10, 2
Offset: 1

Views

Author

Peter Kagey, Nov 18 2020

Keywords

Comments

Records occur at indices n = 1, 3, 6, 9, 12, 18, 24, 30, 36, 60, 90, 120, 180, 270, 360, 420, 540, 630, 840, 1080, ...

Examples

			For n = 35, the a(35) = 5 differences are:
A101321( 5,4) - A101321( 5,2) =  51 -  16 = 35,
A101321( 5,7) - A101321( 5,6) = 141 - 106 = 35,
A101321( 7,3) - A101321( 7,1) =  43 -   8 = 35,
A101321( 7,5) - A101321( 7,4) = 106 -  71 = 35, and
A101321(36,1) - A101321(36,0) =  36 -   1 = 35.
		

Crossrefs

Cf. A333822 (polygonal numbers), A333836 (positive polygonal numbers), A333868 (binomial coefficients), A333880 (perfect powers).

Programs

  • PARI
    a(n) = sumdiv(n, d, if (3*d <= n, numdiv(d>>valuation(d, 2)))); \\ Michel Marcus, Nov 19 2020

Formula

a(n) = Sum_{d|n, 3*d <= n} A001227(d).

A352481 Number of positive integers that are not the sum of distinct centered n-gonal numbers.

Original entry on oeis.org

42, 84, 148, 237, 363, 534, 766, 1060, 1436, 1911, 2484, 3184, 4014
Offset: 3

Views

Author

Ilya Gutkovskiy, Mar 21 2022

Keywords

Crossrefs

A345038 Triangle T(n,k) read by rows of the smallest centered n-gonal number greater than 1 that is also centered k-gonal, or 0 if none exists, for 1 <= k <= n.

Original entry on oeis.org

2, 7, 3, 4, 31, 4, 0, 13, 85, 5, 16, 31, 31, 181, 6, 7, 7, 19, 61, 331, 7, 22, 43, 316, 841, 106, 547, 8, 121, 0, 361, 25, 22801, 169, 841, 9, 0, 91, 10, 0, 1891, 91, 253, 1225, 10, 11, 31, 31, 61, 31, 61, 2101, 361, 1711, 11, 67, 111, 166, 8581, 1156, 397, 6931, 179479609, 496, 2311, 12
Offset: 1

Views

Author

Mohammed Yaseen, Jun 06 2021

Keywords

Comments

The i-th centered j-gonal number is j*i*(i-1)/2 + 1. Thus if the p-th centered n-gonal number is also the q-th centered k-gonal number, then n*p*(p-1) = k*q*(q-1). Therefore T(n,k) = n*p*(p-1)/2 + 1 = k*q*(q-1)/2 + 1 iff n*p*(p-1) = k*q*(q-1) has a nontrivial positive integer solution. Otherwise T(n,k) = 0. It also implies that when T(n,k) = 0, T(r*n,r*k) = 0 for any positive integer r.

Examples

			The triangle begins:
   2;
   7,   3;
   4,  31,   4;
   0,  13,  85,   5;
  16,  31,  31, 181,   6;
   7,   7,  19,  61, 331,   7;
  22,  43, 316, 841, 106, 547,   8;
  ...
		

Crossrefs

Programs

  • PARI
    iszero(n,k)={if(issquare(n) && issquare(k) && n<>k, my(t=n-k); fordiv(t, d, my(p=(d+t/d)/2/sqrtint(n), q=(d-t/d)/2/sqrtint(k)); if(abs(p)!=1 && !frac(p) && !frac(q) && p%2==1 && q%2==1, return(0))); 1, 0)}
    T(n, k)={my(g=gcd(n,k)); n/=g; k/=g; if(iszero(n, k), 0, for(p=2, oo, my(t=n*p*(p-1)/2); if(t%k==0 && ispolygonal(t/k, 3), return(t*g+1))))} \\ Andrew Howroyd, Jun 08 2021

Formula

T(n,n) = n+1.

A352975 a(n) is the smallest number which can be represented as the sum of n distinct centered n-gonal numbers in exactly n ways, or -1 if no such number exists.

Original entry on oeis.org

96, 192, 330, 504, 840, 1304, 1872, 2910, 3971, 5340, 6851, 8932, 11700, 14496, 18258, 22410, 27265, 32620, 39606, 47124, 55545, 65448, 76050, 87854, 101925, 116956, 134125, 152340, 173538, 195424, 220473, 246942, 276570, 306756, 340918, 377644, 418821, 462720
Offset: 3

Views

Author

Ilya Gutkovskiy, Apr 13 2022

Keywords

Comments

If a(n) exists, then n divides a(n). - Thomas Scheuerle, Apr 13 2022

Examples

			For n = 3: 96 = 1 + 10 + 85 = 1 + 31 + 64 = 19 + 31 + 46.
		

Crossrefs

Formula

a(n) >= n*binomial(n + 2, 3) + n, if a(n) exists. - Thomas Scheuerle, Apr 13 2022

Extensions

a(10)-a(16) from Thomas Scheuerle, Apr 13 2022
a(17)-a(40) from Michael S. Branicky, May 19 2022

A360663 a(n) is the least integer m >= 3 such that n is a centered m-gonal number.

Original entry on oeis.org

3, 4, 5, 6, 7, 8, 3, 10, 11, 4, 13, 14, 5, 16, 17, 3, 19, 20, 7, 22, 23, 4, 25, 26, 9, 28, 29, 3, 31, 32, 11, 34, 35, 6, 37, 38, 13, 4, 41, 7, 43, 44, 3, 46, 47, 8, 49, 5, 17, 52, 53, 9, 55, 56, 19, 58, 59, 4, 61, 62, 3, 64, 65, 11, 67, 68, 23, 7, 71, 12, 73, 74, 5, 76, 77, 13, 79
Offset: 4

Views

Author

Ilya Gutkovskiy, Feb 15 2023

Keywords

Examples

			a(16) = 5 since 16 is a centered pentagonal number, but not a centered square or centered triangular number.
		

Crossrefs

Programs

  • Mathematica
    seq[len_] := Module[{s = Table[0, {len}], c = 0, k = 3, n, ckn}, While[c < len, n = 2; While[(ckn = k*n*(n - 1)/2 - 2) <= len, If[s[[ckn]] == 0, c++; s[[ckn]] = k]; n++]; n = 4; k++]; s]; seq[100] (* Amiram Eldar, Mar 06 2023 *)
Previous Showing 21-25 of 25 results.