A271181 Read A002942 digit-by-digit, beginning with an initial 0.
0, 1, 4, 9, 6, 1, 5, 2, 6, 3, 9, 4, 4, 6, 1, 8, 1, 1, 2, 1, 4, 4, 1, 9, 6, 1, 6, 9, 1, 5, 2, 2, 6, 5, 2, 9, 8, 2, 4, 2, 3, 1, 6, 3, 4
Offset: 0
Crossrefs
Cf. A002942.
This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
a(7)=12 belongs to the sequence since writing 12^2 = 144 backwards gives 441 = 21^2.
[n: n in [0..1100] | IsSquare(Seqint(Reverse(Intseq(n^2))))]; // Vincenzo Librandi, Sep 21 2015
rev:= proc(n) local L, Ln, i; L:= convert(n, base, 10); Ln:= nops(L); add(L[i]*10^(Ln-i), i=1..Ln); end proc: select(t -> issqr(rev(t^2)),[$0..10^5]); # Robert Israel, Sep 20 2015
Select[Range[1000], IntegerQ[Sqrt[FromDigits[Reverse[IntegerDigits[ #^2]]]]] &]
from itertools import count, islice from sympy import integer_nthroot def A102859_gen(startvalue=0): # generator of terms >= startvalue return filter(lambda n:integer_nthroot(int(str(n**2)[::-1]),2)[1], count(max(startvalue,0))) A102859_list = list(islice(A102859_gen(),30)) # Chai Wah Wu, Nov 18 2022
a:= n-> (s-> parse(cat(s[-i]$i=1..length(s))))(""||(n^3)): seq(a(n), n=1..60); # Alois P. Heinz, May 20 2022
Table[FromDigits[Reverse[IntegerDigits[n^3]]], {n, 1, 50}] (* Vincenzo Librandi, Aug 27 2013 *) IntegerReverse[Range[50]^3] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Oct 23 2019 *)
a(n) = fromdigits(Vecrev(digits(n^3))); \\ Michel Marcus, Jun 04 2019
def a(n): return int(str(n**3)[::-1]) print([a(n) for n in range(1, 45)]) # Michael S. Branicky, May 24 2022
a(4) = 77 = 16 + 61; a(7) = 143 = 49 + 94.
R:= n-> (s-> parse(cat(s[-i]$i=1..length(s))))(""||n): a:= n-> (s-> s+R(s))(n^2): seq(a(n), n=0..50); # Alois P. Heinz, Sep 24 2018
nsr[n_]:=Module[{n2=n^2},n2+FromDigits[Reverse[IntegerDigits[n2]]]]; Array[ nsr,50,0] (* Harvey P. Dale, Jul 23 2012 *)
{a(n) = n^2+fromdigits(Vecrev(digits(n^2)))} \\ Seiichi Manyama, Sep 24 2018
FromDigits[Reverse[IntegerDigits[#]]]&/@(Range[40]^4) (* Harvey P. Dale, May 03 2012 *)
a(n) = fromdigits(Vecrev(digits(n^4))); \\ Michel Marcus, Jun 04 2019
163 is in the sequence as it is 19^2 = 361 written backwards. - _David A. Corneth_, Aug 06 2022
uptoqdigits(n) = {my(res = List()); forstep(i = 1, sqrtint(10^n), [1,1,1,1,1,1,1,1,2], listput(res, fromdigits(Vecrev(digits(i^2))))); Set(res)} \\ David A. Corneth, Aug 06 2022
revdigs := proc(n) local L, nL, j; L:= convert(n, base, 10); nL:= nops(L); add(L[i]*10^(nL-i), i=1..nL); end: map(t -> revdigs(t^2), [1,2,op(select(isprime, [seq(i,i=3..10^4,2)]))]); # Robert Israel, Nov 20 2015
Join[{1}, FromDigits[Reverse[IntegerDigits[#^2]]]&/@Prime[Range[100]]] (* Vincenzo Librandi, Nov 20 2015 *)
a(n) = if(n==1, 1, eval(concat(Vecrev(Str(prime(n-1)^2))))) \\ Altug Alkan, Nov 20 2015
a(5) = 5213, as 5^5 = 3125.
with(numtheory):for n from 1 to 50 do a := convert(n^n,base,10):b := add(10^(nops(a)- i)*a[i],i=1..nops(a)):printf(`%d,`,b); od:
Table[IntegerReverse[n^n],{n,20}] (* Harvey P. Dale, Jul 31 2022 *)
a(n) = { fromdigits(Vecrev(digits( n^n )))} \\ Harry J. Smith, Jul 29 2009
IntegerReverse/@(Range[51,1,-1]^2) (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jul 25 2019 *)
33^2 = 1089 reversed is 9801 = 99^2.
Comments