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!)
A350812 a(n) = ceiling((n-R(ceiling(n^(1/2))))^2/(n+R(ceiling(n^(1/2))))), where R(ceiling(n^(1/2))) is the digit reversal of ceiling(n^(1/2)). 0
0, 0, 1, 1, 1, 1, 2, 3, 3, 3, 4, 4, 5, 6, 7, 8, 7, 8, 9, 9, 10, 11, 12, 13, 14, 13, 14, 15, 16, 16, 17, 18, 19, 20, 21, 22, 21, 22, 23, 24, 25, 25, 26, 27, 28, 29, 30, 31, 32, 31, 32, 33, 34, 35, 36, 36, 37, 38, 39, 40, 41, 42, 43, 44, 43, 44, 45, 46, 47, 48, 49, 49, 50 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,7
COMMENTS
Blocks of consecutive numbers, duplicates, gaps and irregularities in the sequence explain the separated segments with small oscillations as shown by the graphs.
LINKS
EXAMPLE
For n = 1, R(ceiling(n^(1/2)) = 1, thus a(1) = ceiling((1-1)^2/(1+1)) = 0.
For n = 16, R(ceiling(n^(1/2)) = 4, thus a(16) = ceiling((16-4)^2/(16+4)) = 8.
For n = 21, R(ceiling(n^(1/2)) = 5, thus a(21) = ceiling((21-5)^2/(21+5)) = 10.
MATHEMATICA
Table[Ceiling[(n-FromDigits[Reverse[IntegerDigits[Ceiling[n^(1/2)]]]])^2/(n+FromDigits[Reverse[IntegerDigits[Ceiling[n^(1/2)]]]])], {n, 73}] (* Stefano Spezia, Jan 18 2022 *)
PROG
(PARI) a(n)=my(x=fromdigits(Vecrev(digits(ceil(sqrt(n)))))); r=ceil((n-x)^2/(n+x));
for(n=1, 2000, print1(a(n)", "))
(Python)
from math import isqrt
def R(n): return int(str(n)[::-1])
def a(n):
root = isqrt(n)
Rcroot = R(root) if root**2 ==n else R(root+1)
q, r = divmod((n-Rcroot)**2, n+Rcroot)
return q if r == 0 else q + 1
print([a(n) for n in range(1, 94)]) # Michael S. Branicky, Jan 17 2022
CROSSREFS
Cf. A004086.
Sequence in context: A189674 A156250 A029108 * A181550 A134841 A071112
KEYWORD
nonn,base,easy
AUTHOR
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 August 12 19:26 EDT 2024. Contains 375113 sequences. (Running on oeis4.)