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!)
A272671 Numbers k such that the decimal number 1k is a square. 15

%I #34 Sep 08 2022 08:46:16

%S 6,21,44,69,96,156,225,296,369,444,521,600,681,764,849,936,1025,1236,

%T 1449,1664,1881,2100,2321,2544,2769,2996,3225,3456,3689,3924,4161,

%U 4400,4641,4884,5129,5376,5625,5876,6129,6384,6641,6900,7161,7424,7689,7956,8225,8496,8769,9044,9321,9600

%N Numbers k such that the decimal number 1k is a square.

%H Davin Park, <a href="/A272671/b272671.txt">Table of n, a(n) for n = 1..20000</a>

%e 44 is a member because 144 = 12^2 is a square.

%e 0 is not a member because 10 is not a square.

%p t1:=[];

%p for k from 1 to 20000 do

%p if issqr(k+10^length(k)) then t1:=[op(t1),k]; fi;

%p od;

%p t1;

%t Flatten[n /. Solve[10^# + n == a^2 && 10^(# - 1) <= n < 10^# && a > 0, {n, a}, Integers] & /@ Range[3]] (* _Davin Park_, Feb 05 2017 *)

%o (Magma) [n: n in [1..10000 ] | IsSquare(Seqint(Intseq(n) cat Intseq(1)))]; // _Marius A. Burtea_, Mar 21 2019

%o (PARI) isok(n) = issquare(eval(concat(1, Str(n)))); \\ _Michel Marcus_, Mar 21 2019

%o (Python)

%o from sympy.ntheory.primetest import is_square

%o def ok(n): return is_square(int('1'+str(n)))

%o print(list(filter(ok, range(9601)))) # _Michael S. Branicky_, Jun 21 2021

%Y Cf. A265432, A272672, A045855 (squares beginning with 1), A272684, A272685.

%K nonn,base

%O 1,1

%A _Nathan Fox_, _Brooke Logan_, and _N. J. A. Sloane_, May 20 2016

%E Extended by _Davin Park_, Feb 05 2017

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 April 18 18:58 EDT 2024. Contains 371781 sequences. (Running on oeis4.)