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!)
A363367 a(n) is the least integer i >= 0 such that (i + 1) * (i + 2*n) / 2 = p^2, p prime number (A000040), or a(n) = -1 if no such i exists. 0
-1, -1, 2, 4, 0, -1, 10, 12, -1, 0, 18, -1, 1, -1, -1, 28, 30, -1, -1, 36, -1, 40, 42, -1, 1, 0, -1, 52, -1, -1, 58, 60, -1, -1, 66, -1, 70, 72, -1, -1, 78, -1, 82, -1, -1, 88, -1, -1, -1, 0, -1, 100, 102, -1, 106, 108, -1, 112, -1, -1, 1, -1, -1, -1, 126, -1, 130 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
COMMENTS
The shortest arithmetic sequence with initial term n and difference 1 that sums to p^2, p prime number. 2*(n - 1) >= a(n) >= -1.
LINKS
FORMULA
a(p^2) = 0, p prime number.
EXAMPLE
n = 2: 2 + 3 + 4 = 9 = 3^2, a(2) = 2.
n = 3: 3 + 4 + 5 + 6 + 7 = 5^2, a(3) = 4.
n = 4: 4 = 2^2, a(4) = 0.
CROSSREFS
Sequence in context: A244116 A138133 A302937 * A005657 A009332 A333184
KEYWORD
sign
AUTHOR
Ctibor O. Zizka, Jul 05 2023
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 July 24 14:46 EDT 2024. Contains 374584 sequences. (Running on oeis4.)