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-30 of 41 results. Next

A130423 Main diagonal of array A[k,n] = n-th sum of 3 consecutive k-gonal numbers, k>2.

Original entry on oeis.org

4, 14, 39, 88, 170, 294, 469, 704, 1008, 1390, 1859, 2424, 3094, 3878, 4785, 5824, 7004, 8334, 9823, 11480, 13314, 15334, 17549, 19968, 22600, 25454, 28539, 31864, 35438, 39270, 43369, 47744, 52404, 57358, 62615, 68184, 74074, 80294, 86853
Offset: 1

Views

Author

Jonathan Vos Post, May 26 2007

Keywords

Comments

The first row of the array is the sum of 3 consecutive triangular numbers = A000217(n) + A000217(n+1) + A000217(n+2) = Centered triangular numbers: 3*n*(n-1)/2 + 1, for n>1. The second row of the array is the sum of 3 consecutive squares = Number of points on surface of square pyramid: 3*n^2 + 2 (n>1). The first column of the array is k+1 = 4, 5, 6, 7, 8, 9, ... The second column of the array is A016825 = 4*n + 2 (for n>2). The third column of the array is A017377 = 10*n + 9 (for n>0).

Examples

			The array begins:
k / A[k,n]
3.|.4.10.19.31..46..64..85.109.136.166....=A005448(n+1).
4.|.5.14.29..50..77.110.149.194.245.302...=A005918(n).
5.|.6.18.39..69.108.156.213.279.354.438...=A129863(n).
6.|.7.22.49..88.139.202.277.364.463.574...
7.|.8.26.59.107.170.248.341.449.572.710...
8.|.9.30.69.126.201.294.405.534.681.846...
		

Crossrefs

Programs

  • Magma
    I:=[4, 14, 39, 88]; [n le 4 select I[n] else 4*Self(n-1)-6*Self(n-2)+4*Self(n-3)-Self(n-4): n in [1..40]]; // Vincenzo Librandi, Jun 28 2012
  • Maple
    P := proc(k,n) n*((k-2)*n-k+4)/2 ; end: A := proc(k,n) add( P(k,i),i=n..n+2) ; end: A130423 := proc(n) A(n+3,n) ; end: seq(A130423(n),n=0..40) ; # R. J. Mathar, Jun 14 2007
  • Mathematica
    CoefficientList[Series[(4-2*x+7*x^2)/(1-x)^4,{x,0,40}],x] (* Vincenzo Librandi, Jun 28 2012 *)
    Table[n (3n^2-3n+8)/2,{n,40}] (* or *) LinearRecurrence[{4,-6,4,-1},{4,14,39,88},40] (* Harvey P. Dale, Aug 15 2012 *)

Formula

a(n) = A[n+2,n] = P(k+2,n) + P(k+2,n+1) + P(k+2,n+2) where P(k,n) = k*((n-2)*k - (n-4))/2.
a(n) = n*(3*n^2-3*n+8)/2. G.f.: x*(4-2*x+7*x^2)/(1-x)^4. [Colin Barker, Apr 30 2012]
a(1)=4, a(2)=14, a(3)=39, a(4)=88, a(n)=4*a(n-1)-6*a(n-2)+4*a(n-3)-a(n-4). - Harvey P. Dale, Aug 15 2012

Extensions

More terms from R. J. Mathar, Jun 14 2007

A190876 Numbers 1 through 8 together with numbers congruent to 9 mod 10.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 19, 29, 39, 49, 59, 69, 79, 89, 99, 109, 119, 129, 139, 149, 159, 169, 179, 189, 199, 209, 219, 229, 239, 249, 259, 269, 279, 289, 299, 309, 319, 329, 339, 349, 359, 369, 379, 389, 399, 409, 419, 429, 439, 449, 459, 469, 479, 489, 499, 509, 519, 529, 539, 549, 559, 569, 579, 589, 599, 609
Offset: 1

Views

Author

N. J. A. Sloane, May 23 2011

Keywords

Comments

In lunar arithmetic, numbers n with the property that the sum of the divisors of n that are <= n is equal to n.

Crossrefs

Cf. A017377.

Programs

  • Magma
    [n lt 9 select n else 10*n-81: n in [1..70]]; // Bruno Berselli, May 24 2011
  • Mathematica
    CoefficientList[Series[x*(1+9*x^9)/(1-x)^2,{x,0,69}],x] (* Stefano Spezia, May 26 2025 *)
  • Maxima
    makelist(if n<9 then n else 10*n-81,n,1,70); /* Bruno Berselli, May 24 2011 */
    

Formula

G.f.: x*(1+9*x^9)/(1-x)^2. - Bruno Berselli, May 23 2011
a(n) = 2*a(n-1) -a(n-2). - Vincenzo Librandi, Jul 12 2012

A290972 Primes p such that the sum of the squares of digits of p equals the sum of digits of p^2.

Original entry on oeis.org

2, 3, 3331, 3433, 11243, 13241, 21523, 22153, 22531, 31541, 32141, 32411, 33203, 34033, 34141, 34211, 35141, 41341, 41413, 42131, 43411, 44131, 51341, 51413, 52321, 54311, 102253, 102523, 104231, 104513, 110543, 111263, 111623, 112163
Offset: 1

Views

Author

K. D. Bajpai, Aug 16 2017

Keywords

Comments

214007 is the smallest term that is in A017353 and 31111009 is the smallest term that is in A017377. - Altug Alkan, Aug 16 2017

Examples

			a(3) = 3331 is prime: [3^2 + 3^2 + 3^2 + 1^2 = 9 + 9 + 9 + 1] = 28; [3331^2 = 11095561, 1 + 1 + 0 + 9 + 5 + 5 + 1] = 28.
a(5) = 11243 is prime: [1^2 + 1^2 + 2^2 + 4^2 + 3^2 = 1 + 1 + 4 + 16 + 9] = 31: [11243^2 = 126405049;1 + 2 + 6 + 4 + 0 + 5 + 0 + 4 + 9] = 31.
		

Crossrefs

Intersection of A000040 and A165550.
Cf. A123157.

Programs

  • Maple
    filter:= t -> convert(map(`^`,convert(t,base,10),2),`+`) = convert(convert(t^2,base,10),`+`) and isprime(t):
    select(filter, [2,seq(i,i=3..200000,2)]); # Robert Israel, Aug 16 2017
  • Mathematica
    Select[Prime[Range[20000]], Plus @@ IntegerDigits[#^2] == Total[IntegerDigits[#]^2] &]
  • PARI
    forprime(p=1, 30000, v=digits(p); if(sum(i=1, length(v), v[i]^2) == sumdigits(p^2), print1(p", ")));

A348491 Positive numbers whose square starts and ends with exactly one 9.

Original entry on oeis.org

3, 97, 303, 307, 313, 953, 957, 963, 967, 973, 977, 983, 987, 993, 3003, 3007, 3013, 3017, 3023, 3027, 3033, 3037, 3043, 3047, 3053, 3057, 3063, 3067, 3073, 3077, 3083, 3087, 3093, 3097, 3103, 3107, 3113, 3117, 3123, 3127, 3133, 3137, 3143, 9487, 9493, 9497, 9503, 9507, 9513, 9517
Offset: 1

Views

Author

Bernard Schott, Nov 02 2021

Keywords

Comments

When a square ends with 9, it ends with only one 9.
From Marius A. Burtea, Nov 02 2021 : (Start)
The sequence is infinite because the numbers 303, 3003, 30003, ..., 3*(10^k + 1), k >= 2, are terms with squares 91809, 9018009, 900180009, 90001800009, ... 9*(10^(2*k) + 2*10^k + 1), k >= 2.
Numbers 97, 967, 9667, 96667, 966667, ..., (29*10^n + 1) / 3, k >= 1, are terms and have no digits 0, because their squares are 9409, 935089, 93450889, 9344508889, 934445088889, ...
Also 963, 9663, 96663, 966663, 9666663, 96666663, ... (29*10^k - 11) / 3, k >= 2, are terms and have no digits 0, because their squares are 927369, 93373569, 9343735569, 934437355569, 93444373555569, 9344443735555569, ... (End)

Examples

			97^2 = 9409, hence 97 is a term.
997^2 = 994009, hence  997 is not a term.
		

Crossrefs

Subsequence of A305719, A063226, and A045863.
Cf. A017377, A045863, A273374 (squares ending with 9).
Similar to: A348487 (k=1), A348488 (k=4), A348489 (k=5), A348490 (k=6), this sequence (k=9).

Programs

  • Magma
    [3] cat [n:n in [4..9600]|Intseq(n*n)[1] eq 9 and Intseq(n*n)[#Intseq(n*n)] eq 9]; // Marius A. Burtea, Nov 02 2021
    
  • Mathematica
    Join[{3}, Select[Range[10, 10^4], (d = IntegerDigits[#^2])[[1]] == d[[-1]] == 9 && d[[2]] != 9 &]] (* Amiram Eldar, Nov 02 2021 *)
  • PARI
    isok(k) = my(d=digits(sqr(k))); (d[1]==9) && (d[#d]==9) && if (#d>2, (d[2]!=9) && (d[#d-1]!=9), 1); \\ Michel Marcus, Nov 03 2021
    
  • PARI
    list(lim)=my(v=List([3])); for(d=2, 2*#digits(lim\=1), my(s=sqrtint(9*10^(d-1)-1)+1); s+=[3,2,1,0,3,2,1,0,5,4][s%10+1]; forstep(n=s, min(sqrtint(10^d-10^(d-2)-1), lim), if(s%10==3, [4,6], [6,4]), listput(v, n))); Vec(v) \\ Charles R Greathouse IV, Nov 03 2021
  • Python
    from itertools import count, takewhile
    def ok(n):
      s = str(n*n); return len(s.rstrip("9")) == len(s.lstrip("9")) == len(s)-1
    def aupto(N):
      r = takewhile(lambda x: x<=N, (10*i+d for i in count(0) for d in [3, 7]))
      return [k for k in r if ok(k)]
    print(aupto(9517)) # Michael S. Branicky, Nov 02 2021
    

A354337 a(n) is the integer w such that (L(2*n)^2, -L(2*n + 1)^2, w) is a primitive solution to the Diophantine equation 2*x^3 + 2*y^3 + z^3 = 125, where L(n) is the n-th Lucas number (A000032).

Original entry on oeis.org

19, 149, 1039, 7139, 48949, 335519, 2299699, 15762389, 108037039, 740496899, 5075441269, 34787591999, 238437702739, 1634276327189, 11201496587599, 76776199786019, 526231901914549, 3606847113615839, 24721697893396339, 169445038140158549, 1161393569087713519
Offset: 1

Views

Author

XU Pingya, Jun 20 2022

Keywords

Comments

Subsequence of A017377.

Examples

			2*(L(4)^2)^3 + 2*(-L(5)^2)^3 + (149)^3 = 2*(49)^3 + 2*(-121)^3 + (149)^3 = 125, a(2) = 149.
		

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{7,-1},{19,149},21]-1 + LucasL[2*Range[21]-3]^2

Formula

a(n) = (125 - 2*A005248(n)^6 + 2*A002878(n)^6)^(1/3).
a(n) = Lucas(4*n+2) + Lucas(4n-1) - 3 = 2*A056914(n)-3 = 15*A092521(n) + A288913(n-1).
a(n) = 2*A081017(n) - 1.
a(n) = 10*A089508(n) + 9.
a(n) = 8*a(n-1) - 8*a(n-2) + a(n-3).
G.f.: x*(19 - 3*x - x^2)/((1 - x)*(1 - 7*x + x^2)). - Stefano Spezia, Jun 22 2022

A373460 Numbers k such that k and k+1 both have an equal number of even and odd digits.

Original entry on oeis.org

29, 49, 69, 89, 1009, 1029, 1049, 1069, 1089, 1209, 1229, 1249, 1269, 1289, 1409, 1429, 1449, 1469, 1489, 1609, 1629, 1649, 1669, 1689, 1809, 1829, 1849, 1869, 1889, 2109, 2129, 2149, 2169, 2189, 2309, 2329, 2349, 2369, 2389, 2509, 2529, 2549, 2569, 2589, 2709
Offset: 1

Views

Author

Amiram Eldar, Jun 07 2024

Keywords

Comments

The terms are of the form 100*m + j, where m is either 0 or a term of A227870 and j is in {29, 49, 69, 89} if m = 0 or in {9, 29, 49, 69, 89} if m > 0.

Examples

			29 is a term since it has one even digit (2) and one odd digit (9), and 29+1 = 30 also has one even digit (0) and one odd digit (3).
		

Crossrefs

Subsequence of A017377 and A227870.
Cf. A337238 (binary analog), A373505.

Programs

  • Mathematica
    q[n_] := Module[{d = Differences[Tally[Mod[IntegerDigits[n], 2]]]}, d != {} && d[[1, 2]] == 0]; Select[Range[3000], q[#] && q[# + 1] &]
  • PARI
    iseq(n) = {my(o = 0, e = 0); while(n > 0, if((n%10) % 2 == 0, e++, o++); n \= 10); e == o;}
    lista(kmax) = {my(q1 = 0, q2); for(k = 1, kmax, q2 = iseq(k); if(q1 && q2, print1(k-1, ", ")); q1 = q2);}

Formula

a(n) = 100 * A227870(floor(n/5)) + 20 * (n mod 5) + 9, for n > 4.

A385623 Array read by ascending antidiagonals: A(n,k) is the number obtained by concatenation of n with k in that order, with k >= 0.

Original entry on oeis.org

0, 10, 1, 20, 11, 2, 30, 21, 12, 3, 40, 31, 22, 13, 4, 50, 41, 32, 23, 14, 5, 60, 51, 42, 33, 24, 15, 6, 70, 61, 52, 43, 34, 25, 16, 7, 80, 71, 62, 53, 44, 35, 26, 17, 8, 90, 81, 72, 63, 54, 45, 36, 27, 18, 9, 100, 91, 82, 73, 64, 55, 46, 37, 28, 19, 10, 110, 101, 92, 83, 74, 65, 56, 47, 38, 29, 110, 11
Offset: 0

Views

Author

Stefano Spezia, Jul 05 2025

Keywords

Examples

			Array begins as:
   0,  1,  2,  3,  4,  5,  6,  7, ...
  10, 11, 12, 13, 14, 15, 16, 17, ...
  20, 21, 22, 23, 24, 25, 26, 27, ...
  30, 31, 32, 33, 34, 35, 36, 37, ...
  40, 41, 42, 43, 44, 45, 46, 47, ...
  50, 51, 52, 53, 54, 55, 56, 57, ...
  60, 61, 62, 63, 64, 65, 66, 67, ...
  ...
		

Crossrefs

Cf. A001477 (1st row), A020338 (main diagonal), A055642, A385624 (antidiagonal sums).

Programs

  • Mathematica
    A[n_,k_]:=FromDigits[Join[IntegerDigits[n],IntegerDigits[k]]]; Table[A[n,k],{n,0,6},{k,0,7}] (* or *)
    A[n_,k_]:=If[k==0,10n,n*10^(Floor[Log10[k]]+1)+k]; Table[A[n-k,k],{n,0,11},{k,0,n}]//Flatten
  • PARI
    T(n, k) = fromdigits(concat(digits(n), digits(k))); \\ Michel Marcus, Jul 06 2025

Formula

A(n,0) = 10*n and A(n,k) = n*10^(floor(log_10(k)) + 1) + k for k > 0.

A001535 a(n) = (10n+1)*(10n+9).

Original entry on oeis.org

9, 209, 609, 1209, 2009, 3009, 4209, 5609, 7209, 9009, 11009, 13209, 15609, 18209, 21009, 24009, 27209, 30609, 34209, 38009, 42009, 46209, 50609, 55209, 60009, 65009, 70209, 75609, 81209, 87009, 93009, 99209, 105609, 112209, 119009, 126009, 133209, 140609
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Maple
    seq((10*n+1)*(10*n+9),n = 0 .. 100); # Robert Israel, Dec 17 2014
  • Mathematica
    Times@@@Table[10n+{1,9},{n,0,40}] (* or *) LinearRecurrence[{3,-3,1},{9,209,609},40] (* Harvey P. Dale, Oct 15 2014 *)
    CoefficientList[Series[(9 + 182 x + 9 x^2) / (1 - x)^3, {x, 0, 50}], x] (* Vincenzo Librandi, Dec 17 2014 *)
  • PARI
    a(n)=(10*n+1)*(10*n+9) \\ Charles R Greathouse IV, Jun 16 2017

Formula

a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3); a(0)=9, a(1)=209, a(2)=609. - Harvey P. Dale, Oct 15 2014
G.f.: (9 + 182*x + 9*x^2)/(1 - x)^3. - Vincenzo Librandi, Dec 17 2014
E.g.f.: (100*x^2 + 200*x + 9)*exp(x). - Robert Israel, Dec 17 2014
From Amiram Eldar, Feb 20 2023: (Start)
a(n) = A017281(n)*A017377(n).
Sum_{n>=0} 1/a(n) = sqrt(5+2*sqrt(5))*Pi/80.
Sum_{n>=0} (-1)^n/a(n) = (sqrt(10+2*sqrt(5)) * log(cot(Pi/20)) + sqrt(10-2*sqrt(5)) * log(cot(3*Pi/20)))/80.
Product_{n>=0} (1 - 1/a(n)) = 2*phi*cos(sqrt(17)*Pi/10), where phi is the golden ratio (A001622).
Product_{n>=0} (1 + 1/a(n)) = 2*phi*cos(sqrt(15)*Pi/10). (End)

A017384 a(n) = (10*n + 9)^8.

Original entry on oeis.org

43046721, 16983563041, 500246412961, 5352009260481, 33232930569601, 146830437604321, 513798374428641, 1517108809906561, 3936588805702081, 9227446944279201, 19925626416901921, 40213853471634241, 76686282021340161
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

Formula

From Iain Fox, Dec 02 2017: (Start)
a(n) = 9*a(n-1) - 36*a(n-2) + 84*a(n-3) - 126*a(n-4) + 126*a(n-5) - 84*a(n-6) + 36*a(n-7) - 9*a(n-8) + a(n-9), n > 8.
G.f.: (43046721 + 16596142552*x + 348944027548*x^2 + 1457583888744*x^3 + 1652522683270*x^4 + 520202222824*x^5 + 35893629468*x^6 + 214358872*x^7 + x^8)/(1-x)^9.
E.g.f.: exp(x)*(43046721 + 16940516320*x + 233161166800*x^2 + 650362944000*x^3 + 614936700000*x^4 + 243902400000*x^5 + 43988000000*x^6 + 3520000000*x^7 + 100000000*x^8). (End)
a(n) = A001016(A017377(n)). - Felix Fröhlich, Dec 03 2017

A130424 Main diagonal of array A[k,n] = n-th sum of k consecutive k-gonal numbers, k>2.

Original entry on oeis.org

4, 30, 125, 365, 854, 1724, 3135, 5275, 8360, 12634, 18369, 25865, 35450, 47480, 62339, 80439, 102220, 128150, 158725, 194469, 235934, 283700, 338375, 400595, 471024, 550354, 639305, 738625, 849090, 971504, 1106699, 1255535, 1418900
Offset: 1

Views

Author

Jonathan Vos Post, May 26 2007

Keywords

Comments

The first row of the array is the sum of 3 consecutive triangular numbers = A000217(n) + A000217(n+1) + A000217(n+2) = Centered triangular numbers: 3*n*(n-1)/2 + 1, for n>1. The second row of the array is the sum of 4 consecutive squares = n^2 + (n+1)^2 + (n+2)^2 + (n+3)^2 = A027575(n). The third row of the array is the sum of 5 consecutive pentagonal numbers.

Examples

			The array begins:
k / A[k,n]
3.|...4..10..19...31...46...64...85..109.136.166...=A005448(n+1).
4.|..14..30..54...86..126..174..230..294.366.446...=A027575(n).
5.|..40..75.125..190..270..365..475..600.740...
6.|..95.161.251..365..503..665..851.1061.1295...
7.|.196.308.455..637..854.1106.1393.1715.2072...
8.|.364.540.764.1036.1356.1724.2140.2604.3116...
		

Crossrefs

Programs

  • Maple
    P := proc(k,n) n*((k-2)*n-k+4)/2 ; end: A := proc(k,n) add( P(k,i),i=n..n+k-1) ; end: A130424 := proc(n) A(n+3,n) ; end: seq(A130424(n),n=0..40) ; # R. J. Mathar, Oct 28 2007
  • Mathematica
    LinearRecurrence[{5,-10,10,-5,1},{4,30,125,365,854},50] (* Harvey P. Dale, Jun 23 2020 *)

Formula

a(n) = A[n+2,n] = P(k+2,n) + P(k+2,n+1) + P(k+2,n+2) + ... P(k+2,n+k-1) where P(k,n) = k*((n-2)*k - (n-4))/2.
a(n) = (n+2)*(7*n^3-8*n^2+12*n-3)/6. [R. J. Mathar, Oct 30 2008]
G.f.: x*(4+10*x+15*x^2-x^4)/(1-x)^5. [Colin Barker, Sep 08 2012]

Extensions

More terms from R. J. Mathar, Oct 28 2007
Previous Showing 21-30 of 41 results. Next