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 11-19 of 19 results.

A131750 Numbers that are both centered triangular and centered square.

Original entry on oeis.org

1, 85, 16381, 3177721, 616461385, 119590330861, 23199907725541, 4500662508423985, 873105326726527441, 169377932722437899461, 32858445842826225967885, 6374369115575565399870121
Offset: 1

Views

Author

Richard Choulet, Sep 20 2007

Keywords

Comments

We solve r^2+(r+1)^2=0.5*(3*p^2+3*p+2), which is equivalent to (4*r+2)^2=3*(2*p+1)^2+1.
The Diophantine equation X^2=3*Y^2+1 gives X by A001075 and Y by A013453. The return to r gives the sequence 0,6,90,1260,17556,... which satisfies the formulas a(n+2)=14*a(n+1)-a(n)+6 and a(n+1)=7*a(n)+3+(48*a(n)^2+48*a(n)+9)^0.5 and the return to p the sequence A001921 which satisfies this new relation: a(n+1)=7*a(n)+sqrt(48*a(n)^2+48*a(n)+16). Then we obtain the present sequence.

Crossrefs

Intersection of A001844 and A005448.

Programs

  • Magma
    [n le 2 select 1 else Floor(97*Self(n-2) - 54 + 14*Sqrt(48*Self(n-2)^2-54*Self(n-2)+15)): n in [2..30]]; // Vincenzo Librandi, Aug 26 2015
  • Maple
    A131750 := proc(n) coeftayl(x*(1-110*x+x^2)/(1-x)/(1-194*x+x^2),x=0,n) ; end: seq(A131750(n),n=1..20) ; # R. J. Mathar, Oct 24 2007
  • Mathematica
    LinearRecurrence[{195,-195,1},{1,85,16381},20] (* Harvey P. Dale, Apr 26 2018 *)

Formula

a(n+2) = 195*a(n+1)-195*a(n)+a(n-1).
a(n+1) = 97*a(n) - 54 + 14*sqrt(48*a(n)^2-54*a(n)+15).
G.f.: x*(1-110*x+x^2)/((1-x)*(1-194*x+x^2)).

Extensions

More terms from R. J. Mathar, Oct 24 2007
Recurrences corrected by Robert Israel, Aug 26 2015
Name corrected by Daniel Poveda Parrilla, Sep 19 2016

A222390 Nonnegative integers m such that 10*m*(m+1)+1 is a square.

Original entry on oeis.org

0, 3, 15, 132, 588, 5031, 22347, 191064, 848616, 7255419, 32225079, 275514876, 1223704404, 10462309887, 46468542291, 397292260848, 1764580902672, 15086643602355, 67007605759263, 572895164628660, 2544524437949340, 21754929612286743, 96624921036315675
Offset: 1

Views

Author

Bruno Berselli, Feb 18 2013

Keywords

Comments

a(n+1)/a(n) tends alternately to (7+2*sqrt(10))/3 and (13+4*sqrt(10))/3; a(n+2)/a(n) tends to A176398^2.
Subsequence of A014601.

Crossrefs

Cf. nonnegative integers m such that k*m*(m+1)+1 is a square: A001652 (k=2), A001921 (k=3), A001477 (k=4), A053606 (k=5), A105038 (k=6), A105040 (k=7), A053141 (k=8), this sequence (k=10), A105838 (k=11), A061278 (k=12), A104240 (k=13); A105063 (k=17), A222393 (k=18), A101180 (k=19), A077259 (k=20) [incomplete list].
Cf. A221875.

Programs

  • Magma
    m:=22; R:=PowerSeriesRing(Integers(), m); [0] cat Coefficients(R!(3*(1+4*x+x^2)/((1-x)*(1-6*x-x^2)*(1+6*x-x^2))));
    
  • Magma
    I:=[0,3,15,132,588]; [n le 5 select I[n] else Self(n-1) +38*Self(n-2)-38*Self(n-3)-Self(n-4)+Self(n-5): n in [1..25]]; // Vincenzo Librandi, Aug 18 2013
    
  • Mathematica
    LinearRecurrence[{1, 38, -38, -1, 1}, {0, 3, 15, 132, 588}, 23]
    CoefficientList[Series[3 x (1 + 4 x + x^2)/((1 - x) (1 - 6 x - x^2) (1 + 6 x - x^2)), {x, 0, 25}], x] (* Vincenzo Librandi, Aug 18 2013 *)
  • Maxima
    makelist(expand(-1/2+((5+(-1)^n*sqrt(10))*(3-sqrt(10))^(2*floor(n/2))+(5-(-1)^n*sqrt(10))*(3+sqrt(10))^(2*floor(n/2)))/20), n, 1, 23);
    
  • PARI
    x='x+O('x^30); concat([0], Vec(3*x*(1+4*x+x^2)/((1-x)*(1-6*x-x^2)*(1+6*x-x^2)))) \\ G. C. Greubel, Jul 15 2018

Formula

G.f.: 3*x*(1+4*x+x^2)/((1-x)*(1-6*x-x^2)*(1+6*x-x^2)).
a(n) = a(-n+1) = a(n-1)+38*a(n-2)-38*a(n-3)-a(n-4)+a(n-5).
a(n) = -1/2+((5+t*(-1)^n)*(3-t)^(2*floor(n/2))+(5-t*(-1)^n)*(3+t)^(2*floor(n/2)))/20, where t=sqrt(10).
2*a(n)+1 = A221875(n).

A350090 a(n) is the number of indices i in the range 0 <= i <= n-1 such that A003215(n) - A003215(i) is an oblong number (A002378), where A003215 are the hex numbers.

Original entry on oeis.org

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

Views

Author

Klaus Purath and Michel Marcus, Dec 14 2021

Keywords

Comments

There are very few even terms in the data (3 up to 10000). They are obtained for indices coming from A001921. For odd terms see A350120.
a(n) = 1 for n in A111251.

Examples

			For n=5, the 5 numbers hex(5)-hex(i), for i=0 to 4, are (90, 84, 72, 54, 30) out of which 90, 72 and 30 are oblong, so a(5) = 3.
		

Crossrefs

Programs

  • Mathematica
    obQ[n_] := IntegerQ @ Sqrt[4*n + 1]; hex[n_] := 3*n*(n + 1) + 1; a[n_] := Module[{h = hex[n]}, Count[Range[0, n - 1], ?(obQ[h - hex[#]] &)]]; Array[a, 100, 0] (* _Amiram Eldar, Dec 14 2021 *)
  • PARI
    hex(n) = 3*n*(n+1)+1; \\ A003215
    isob(n) = my(m=sqrtint(n)); m*(m+1)==n; \\ A002378
    a(n) = my(h=hex(n)); sum(k=0, n-1, isob(h - hex(k)));
    
  • PARI
    a(n) = numdiv(3*n*n + 3*n + 1) - 1; \\ Jinyuan Wang, Dec 19 2021

Formula

a(n) = A000005(A003215(n)) - 1. - Jinyuan Wang, Dec 19 2021

Extensions

Edited by N. J. A. Sloane, Dec 25 2021

A006244 Hexagonal numbers (A000384) which are also centered hexagonal numbers (A003215).

Original entry on oeis.org

1, 91, 8911, 873181, 85562821, 8384283271, 821574197731, 80505887094361, 7888755361049641, 773017519495770451, 75747828155224454551, 7422514141692500775541, 727330638057709851548461, 71270980015513872950973631, 6983828710882301839343867371, 684343942686450066382748028721
Offset: 1

Views

Author

Keywords

Comments

Equivalently, triangular hex numbers.

Examples

			a(1)=91 because 91 is the sixth centered hexagonal number and the seventh hexagonal number.
		

References

  • M. Gardner, Time Travel and Other Mathematical Bewilderments. Freeman, NY, 1988, p. 19.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Maple
    CP := n -> 1+1/2*6*(n^2-n): N:=10: u:=5: v:=1: x:=6: y:=1: k_pcp:=[1]: for i from 1 to N do tempx:=x; tempy:=y; x:=tempx*u+24*tempy*v: y:=tempx*v+tempy*u: s:=(y+1)/2: k_pcp:=[op(k_pcp),CP(s)]: end do: k_pcp; # Steven Schlicker, Apr 24 2007
    A006244:=-(1-8*z+z**2)/(z-1)/(z**2-98*z+1); # Conjectured (correctly) by Simon Plouffe in his 1992 dissertation.
    a := n -> (Matrix([[91,1,1]]). Matrix([[99,1,0],[ -99,0,1],[1,0,0]])^n)[1,3]; seq (a(n), n=1..20); # Alois P. Heinz, Aug 14 2008
  • Mathematica
    CoefficientList[Series[(1 - 8*x + x^2)/(1 - 99*x + 99*x^2 - x^3), {x, 0, 20}], x] (* Jean-François Alcover, Feb 26 2015 *)
  • PARI
    Vec(-x*(x^2-8*x+1)/((x-1)*(x^2-98*x+1)) + O(x^100)) \\ Colin Barker, Jan 08 2015

Formula

From Richard Choulet, Sep 19 2007: (Start)
We must solve 2*r^2-r=3*p^2-3*p+1, which gives X^2=6*Y^2+3 with X=4*r-1 and Y=2*p-1. We obtain at the same time the following sequences:
X is given by 3, 27, 267, ... sequence for which a(n+2)=10*a(n+1)-a(n) and a(n+1)=5*a(n)+2*(6a(n)^2-18)^0.5
Y is given by 1, 11, 109, ... sequence for which a(n+2)=10*a(n+1)-a(n) and a(n+1)=5*a(n)+2*(6a(n)^2+3)^0.5
p is given by 1, 6, 55, 540, ... sequence for which a(n+2)=10*a(n+1)-a(n)-4 and a(n+1)=5*a(n)-2+(24*a(n)^2-24*a(n)+9)^0.5
r is given by 1, 7, 67, 661, ... sequence for which a(n+2)=10*a(n+1)-a(n)-2 and a(n+1)=5*a(n)-1+(24*a(n)^2-12*a(n)-3)^0.5
a(n+2) = 98*a(n+1)-a(n)-6, a(n+1)=49*a(n)-3+5*(96*a(n)^2-12*a(n)-3)^0.5.
G.f.: z*(1-8*z+z^2)/((1-z)*(1-98*z+z^2)). (End)
Define x(n) + y(n)*sqrt(24) = (6+sqrt(24))*(5+sqrt(24))^n, s(n) = (y(n)+1)/2; then a(n) = (1/2)*(2+6*(s(n)^2-s(n))). - Steven Schlicker, Apr 24 2007
a(n) = (A007667(n+1)-1)/4. - Ralf Stephan, Mar 03 2004
a(n) = 99*a(n-1)-99*a(n-2)+a(n-3). - Colin Barker, Jan 08 2015

Extensions

Edited by N. J. A. Sloane, Sep 25 2007
More terms from Alois P. Heinz, Aug 14 2008
More terms from Jon E. Schoenfield, Dec 26 2008

A120744 Least k>0 such that a centered polygonal number nk(k+1)/2+1 is a perfect square; or -1 if no such number exists.

Original entry on oeis.org

2, -1, 1, 3, 2, 7, 15, 1, 16, 8, 14, 4, 5, 15, 1, 2, 5, -1, 6, 3, 2, 39, 6, 1, 21, 7, 110, 3, 15, 7, 15, -1, 2, 8, 1, 4, 989, 8, 14, 2, 45, 15, 9, 4, 5, 335, 9, 1, 29, -1, 30, 15, 10, 415, 6, 2, 10, 32, 54, 3, 77, 55, 1, 5, 2, 7, 47750, 11, 15, 23, 47, -1, 48, 24, 16, 12, 5, 8, 2639, 1, 6720, 704, 38, 4, 2, 39, 505, 3, 13, 56, 9, 20, 13, 1631, 41
Offset: 1

Views

Author

Alexander Adamchuk, Apr 26 2007

Keywords

Examples

			a(5) = 2 because A129556(2) = 2>1 and A129556(1) = 0<1.
		

Crossrefs

Formula

a(n) = -1 for n in A166259.
a(n) = 1 for n = k^2-1.

Extensions

Edited and b-file provided by Max Alekseyev, Jan 20 2010

A166259 Positive integers n such that a centered polygonal number n*k*(k+1)/2+1 is not a square for any k > 0.

Original entry on oeis.org

2, 18, 32, 50, 72, 98, 128, 162, 200, 242, 338, 392, 450, 512, 578, 648, 722, 882, 968, 1058, 1152, 1250, 1352, 1458, 1682, 1800, 1922, 2048, 2178, 2312, 2401, 2450, 2662, 2738, 2809, 2888, 3042, 3174, 3200, 3362, 3528, 3698, 3750, 4050, 4225, 4232, 4418, 4489, 4608, 4802
Offset: 1

Views

Author

Alexander Adamchuk, Oct 10 2009

Keywords

Comments

Positive integers n such that A120744(n) = -1.

Crossrefs

Extensions

Edited and extended by Max Alekseyev, Jan 20 2010

A222393 Nonnegative integers m such that 18*m*(m+1)+1 is a square.

Original entry on oeis.org

0, 4, 12, 152, 424, 5180, 14420, 175984, 489872, 5978292, 16641244, 203085960, 565312440, 6898944364, 19203981732, 234361022432, 652370066464, 7961375818340, 22161378278060, 270452416801144, 752834491387592, 9187420795420572, 25574211328900084
Offset: 1

Views

Author

Bruno Berselli, Feb 19 2013

Keywords

Comments

a(n+2)/a(n) tends to A156164.
a(n) is congruent to {0,2,4} (mod 5, 6 and 10).

Crossrefs

Cf. nonnegative integers n such that k*n*(n+1)+1 is a square: A001652 (k=2), A001921 (k=3), A001477 (k=4), A053606 (k=5), A105038 (k=6), A105040 (k=7), A053141 (k=8), A222390 (k=10), A105838 (k=11), A061278 (k=12), A104240 (k=13); A105063 (k=17), this sequence (k=18), A101180 (k=19), A077259 (k=20) [incomplete list].

Programs

  • Magma
    m:=22; R:=PowerSeriesRing(Integers(), m); [0] cat Coefficients(R!(4*(1+x)^2/((1-x)*(1-6*x+x^2)*(1+6*x+x^2))));
    
  • Magma
    I:=[0,4,12,152,424]; [n le 5 select I[n] else Self(n-1)+34*Self(n-2)-34*Self(n-3)-Self(n-4)+Self(n-5): n in [1..25]]; // Vincenzo Librandi, Aug 18 2013
    
  • Mathematica
    LinearRecurrence[{1, 34, -34, -1, 1}, {0, 4, 12, 152, 424}, 23]
    CoefficientList[Series[4 x (1 + x)^2 / ((1 - x) (1 - 6 x + x^2) (1 + 6 x + x^2)), {x, 0, 25}], x] (* Vincenzo Librandi, Aug 18 2013 *)
  • Maxima
    makelist(expand(-1/2+((3+sqrt(2)*(-1)^n)*(3-2*sqrt(2))^(2*floor(n/2))+(3-sqrt(2)*(-1)^n)*(3+2*sqrt(2))^(2*floor(n/2)))/12), n, 1, 23);
    
  • PARI
    x='x+O('x^30); concat([0], Vec(4*x*(1+x)^2/((1-x)*(1-6*x+x^2)*(1+6*x+x^2)))) \\ G. C. Greubel, Jul 15 2018

Formula

G.f.: 4*x*(1+x)^2/((1-x)*(1-6*x+x^2)*(1+6*x+x^2)).
a(n) = a(-n+1) = a(n-1)+34*a(n-2)-34*a(n-3)-a(n-4)+a(n-5).
a(n) = -1/2+((3+t*(-1)^n)*(3-2*t)^(2*floor(n/2))+(3-t*(-1)^n)*(3+2*t)^(2*floor(n/2)))/12, where t=sqrt(2).

A274971 Numbers k such that (x+1)^3 - x^3 = k*y^2 has integer solutions.

Original entry on oeis.org

1, 7, 19, 31, 37, 43, 61, 67, 79, 91, 103, 127, 139, 151, 157, 163, 169, 199, 211, 217, 223, 247, 271, 283, 307, 313, 331, 343, 349, 367, 373, 379, 397, 403, 427, 439, 463, 469, 487, 499, 511, 523, 547, 553, 571, 577, 607, 613, 619, 631, 643, 661, 679, 691
Offset: 1

Views

Author

Colin Barker, Jul 13 2016

Keywords

Examples

			7 is in the sequence because, for instance, (167^3-166^3)/7 = 11881 = 109^2.
		

Crossrefs

Cf. A001921 (k=1), A144929 (k=7), A145124 (k=19), A145323 (k=31), A145700 (k=37), A145336 (k=43), A274972 (k=61), A145212 (k=67), A145309 (k=79), A145530 (k=91), A147530 (k=103), A145720 (k=127).
Cf. A003215 is a subsequence; A004611 contains this sequence.

Programs

  • Mathematica
    A004611=Select[Range[500],And@@(Mod[#,3]==1&)/@(First/@FactorInteger[#])&]; Select[A004611,Reduce[x^2+3== 12*#*y^2,{x,y},Integers]=!=False &] (* Ray Chandler, Jul 24 2016 *)

Extensions

More terms using solver at Alpern link by Ray Chandler, Jul 23 2016

A145856 Least number k>1 such that centered n-gonal number n*k(k-1)/2+1 is a perfect square, or 0 if no such k exists.

Original entry on oeis.org

3, 0, 2, 4, 3, 8, 16, 2, 17, 9, 15, 5, 6, 16, 2, 3, 6, 0, 7, 4, 3, 40, 7, 2, 22, 8, 111, 4, 16, 8, 16, 0, 3, 9, 2, 5, 990, 9, 15, 3, 46, 16, 10, 5, 6, 336, 10, 2, 30, 0, 31, 16, 11, 416, 7, 3, 11, 33, 55, 4, 78, 56, 2, 6, 3, 8, 47751, 12, 16, 24, 48, 0, 49, 25, 17, 13, 6, 9, 2640, 2, 6721
Offset: 1

Views

Author

Alexander Adamchuk, Oct 22 2008

Keywords

References

  • Jonathan Vos Post, When Centered Polygonal Numbers are Perfect Squares, submitted to Mathematics Magazine, 4 May 2004, manuscript no. 04-1165, unpublished, available upon request. - Jonathan Vos Post, Oct 25 2008

Crossrefs

Formula

a(n) = 0 for n in A166259.
a(n) = A120744(n) + 1. - Alexander Adamchuk, Oct 10 2009

Extensions

Edited by Max Alekseyev, Jan 23 2010
Previous Showing 11-19 of 19 results.