login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A299921 Squares that differ from a triangular number by 1. 4
0, 1, 4, 9, 16, 121, 324, 529, 4096, 11025, 17956, 139129, 374544, 609961, 4726276, 12723489, 20720704, 160554241, 432224100, 703893961, 5454117904, 14682895929, 23911673956, 185279454481, 498786237504, 812293020529, 6294047334436, 16944049179225, 27594051024016 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
COMMENTS
Squares k such that 8*k-7 or 8*k+9 is a square. - Robert Israel, Mar 18 2018
LINKS
FORMULA
From Robert Israel, Mar 18 2018: (Start)
G.f.: x^2*(1+4*x+9*x^2-19*x^3-19*x^4+9*x^5+4*x^6+x^7)/(1-35*x^3+35*x^6-x^9).
a(n) = 35*a(n-3) - 35*a(n-6) + a(n-9). (End)
MAPLE
f:= gfun:-rectoproc({a(n+9) = 35*a(n+6) - 35*a(n+3) + a(n), seq(a(i)=[0, 1, 4, 9, 16, 121, 324, 529, 4096][i], i=1..9)}, a(n), remember):
map(f, [$1..50]); # Robert Israel, Mar 18 2018
MATHEMATICA
LinearRecurrence[{0, 0, 35, 0, 0, -35, 0, 0, 1}, {0, 1, 4, 9, 16, 121, 324, 529, 4096}, 50] (* Jean-François Alcover, Sep 17 2022 *)
PROG
(PARI) isok(n) = issquare(n) && (ispolygonal(n+1, 3) || ispolygonal(n-1, 3)); \\ Michel Marcus, Mar 17 2018
CROSSREFS
Sequence in context: A352919 A263094 A226354 * A089149 A082920 A204434
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Mar 17 2018
EXTENSIONS
More terms from Altug Alkan, Mar 17 2018
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 18 22:18 EDT 2024. Contains 371782 sequences. (Running on oeis4.)