login
Nonnegative numbers k such that, in decimal representation, the subsequence of digits of k^2 occupying an odd position is equal to the digits of k.
2

%I #50 Nov 05 2023 21:27:15

%S 0,1,5,6,10,11,50,60,76,100,105,110,500,501,505,506,600,605,756,760,

%T 826,1000,1001,1050,1100,5000,5010,5050,5060,5941,6000,6050,7560,7600,

%U 8260,10000,10005,10010,10500,10505,11000,12731

%N Nonnegative numbers k such that, in decimal representation, the subsequence of digits of k^2 occupying an odd position is equal to the digits of k.

%C If k is in the sequence then so is 10*k. - _David A. Corneth_, Sep 29 2019

%C No term starts with the digit 2. - _Chai Wah Wu_, Apr 04 2023

%H David A. Corneth, <a href="/A326418/b326418.txt">Table of n, a(n) for n = 1..2361</a> (terms < 10^15; first 485 terms from Charles R Greathouse IV)

%e 5^2 = 25, whose first digit is 5, hence 5 is a term of the sequence.

%e 11^2 = 121, whose first and third digit are (1, 1), hence 11 is a term of the sequence.

%e 756^2 = 571536, whose digits in odd positions - starting from the least significant one - are (7, 5, 6), hence 756 is a term of the sequence.

%t Select[Range[0, 13000], Reverse@ #[[-Range[1, Length@ #, 2]]] &@ IntegerDigits[#^2] === IntegerDigits[#] &] (* _Michael De Vlieger_, Oct 06 2019 *)

%o (PARI) isok(n) = my(d=Vecrev(digits(n^2))); fromdigits(Vecrev(vector((#d+1)\2, k, d[2*k-1]))) == n; \\ _Michel Marcus_, Oct 01 2019

%o (Python)

%o def ok(n): s = str(n*n); return n == int("".join(s[1-len(s)%2::2]))

%o print(list(filter(ok, range(13000)))) # _Michael S. Branicky_, Sep 10 2021

%Y Subsequence of A008851, A029772, A046829, A064827, A052212, A189056.

%K nonn,base

%O 1,3

%A _Riccardo Pietro Giovambattista Mazzei_ and _Matteo Albanese_, Sep 28 2019