OFFSET
1,3
COMMENTS
This sequence gives both at large and small scales well-structured graphs; specific and periodic patterns are visible in separated layers.
LINKS
Rémy Sigrist, Table of n, a(n) for n = 1..10000
EXAMPLE
For n = 1, R(n^2) = 1, thus a(1) = ceiling((1-1)^2/(1+1)) = 0.
For n = 10, R(n^2) = 1, thus a(10) = ceiling((10-1)^2/(10+1)) = 8.
For n = 21, R(n^2) = 144, thus a(21) = ceiling((21-144)^2/(21+144)) = 92.
MATHEMATICA
Table[Ceiling[(n-FromDigits[Reverse[IntegerDigits[n^2]]])^2/(n+FromDigits[Reverse[IntegerDigits[n^2]]])], {n, 57}] (* Stefano Spezia, Jan 18 2022 *)
PROG
(PARI) a(n) = my(x = fromdigits(Vecrev(digits(n^2)))); r = ceil((n-x)^2/(n+x));
for(n = 1, 2000, print1(a(n)", "))
(Python)
def R(n): return int(str(n)[::-1])
def a(n):
Rn2 = R(n**2)
q, r = divmod((n-Rn2)**2, n+Rn2)
return q if r == 0 else q + 1
print([a(n) for n in range(1, 67)]) # Michael S. Branicky, Jan 17 2022
CROSSREFS
KEYWORD
AUTHOR
Claude H. R. Dequatre, Jan 17 2022
STATUS
approved