login
A348596
a(n) = A068527(2*n+1).
3
0, 1, 4, 2, 0, 5, 3, 1, 8, 6, 4, 2, 0, 9, 7, 5, 3, 1, 12, 10, 8, 6, 4, 2, 0, 13, 11, 9, 7, 5, 3, 1, 16, 14, 12, 10, 8, 6, 4, 2, 0, 17, 15, 13, 11, 9, 7, 5, 3, 1, 20, 18, 16, 14, 12, 10, 8, 6, 4, 2, 0, 21, 19, 17, 15, 13, 11, 9, 7, 5, 3, 1, 24, 22, 20, 18, 16
OFFSET
0,3
FORMULA
a(n) = (ceiling(sqrt(2*n + 1)))^2 - (2*n + 1).
PROG
(Python)
from math import isqrt
def A348596(n): return (isqrt(2*n)+1)**2-2*n-1 # Chai Wah Wu, Feb 22 2022
CROSSREFS
Cf. A068527, A046092 (position of 0's), A056220 (position of 1's), A350962.
Sequence in context: A136715 A077116 A249507 * A135730 A188595 A144102
KEYWORD
nonn,easy
AUTHOR
Ryan Jean, Feb 22 2022
EXTENSIONS
Edited by N. J. A. Sloane, Feb 22 2022
STATUS
approved