login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

a(n) = ceiling((n-R(n^2))^2/(n+R(n^2))), where R(n^2) is the digit reversal of n^2.
1

%I #25 Jan 26 2022 07:23:51

%S 0,1,3,50,39,48,75,27,3,8,92,407,923,651,479,606,933,372,114,11,92,

%T 422,859,607,456,602,850,410,81,12,96,4106,9703,6410,5117,6814,9521,

%U 4329,1139,5,1742,4547,9353,6261,5069,5976,8882,3891,904,1,919,3919,8925,6032,5041,6147,9254

%N a(n) = ceiling((n-R(n^2))^2/(n+R(n^2))), where R(n^2) is the digit reversal of n^2.

%C This sequence gives both at large and small scales well-structured graphs; specific and periodic patterns are visible in separated layers.

%H Rémy Sigrist, <a href="/A350810/b350810.txt">Table of n, a(n) for n = 1..10000</a>

%e For n = 1, R(n^2) = 1, thus a(1) = ceiling((1-1)^2/(1+1)) = 0.

%e For n = 10, R(n^2) = 1, thus a(10) = ceiling((10-1)^2/(10+1)) = 8.

%e For n = 21, R(n^2) = 144, thus a(21) = ceiling((21-144)^2/(21+144)) = 92.

%t Table[Ceiling[(n-FromDigits[Reverse[IntegerDigits[n^2]]])^2/(n+FromDigits[Reverse[IntegerDigits[n^2]]])],{n,57}] (* _Stefano Spezia_, Jan 18 2022 *)

%o (PARI) a(n) = my(x = fromdigits(Vecrev(digits(n^2))));r = ceil((n-x)^2/(n+x));

%o for(n = 1,2000,print1(a(n)", "))

%o (Python)

%o def R(n): return int(str(n)[::-1])

%o def a(n):

%o Rn2 = R(n**2)

%o q, r = divmod((n-Rn2)**2, n+Rn2)

%o return q if r == 0 else q + 1

%o print([a(n) for n in range(1, 67)]) # _Michael S. Branicky_, Jan 17 2022

%Y Cf. A000290, A002942, A004086.

%K nonn,base,easy,look

%O 1,3

%A _Claude H. R. Dequatre_, Jan 17 2022