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!)
A191486 Squares using only the prime digits (2,3,5,7). 7

%I #36 Sep 08 2022 08:45:57

%S 25,225,7225,27225,55225,235225,2772225,3553225,23377225,33235225,

%T 57532225,227557225,252333225,277722225,337273225,357777225,523723225,

%U 735223225,777573225,2523555225,3325252225,3377353225,5232352225,7333353225

%N Squares using only the prime digits (2,3,5,7).

%C a(n) = 225 mod 1000 for n > 1. - _Charles R Greathouse IV_, May 14 2013

%C The sequence is infinite: it contains A030485 as an infinite proper subsequence which in turn contains all numbers of the form ((5*10^n-5)/3)^2 as a proper subsequence. - _M. F. Hasler_, Sep 16 2016

%H Charles R Greathouse IV and Donovan Johnson, <a href="/A191486/b191486.txt">Table of n, a(n) for n = 1..1000</a> (first 155 terms from Charles R Greathouse IV)

%F a(n) = A275971(n)^2. - _M. F. Hasler_, Sep 16 2016

%p for b from 1 do convert(convert(b^2,base,10),set) ; if % minus {2,3,5,7} = {} then printf("%d,\n",b^2) ; end if; end do: # _R. J. Mathar_, Jun 03 2011

%t w = Boole@! PrimeQ@ # & /@ RotateLeft@ Range[0, 9]; Select[Range[10^5]^2, Total@ Pick[DigitCount@ #, w, 1] == 0 &] (* _Michael De Vlieger_, Aug 15 2016 *)

%o (Magma) [n^2: n in [5..5*10^5] | Set(Intseq(n^2)) subset {2,3,5,7}]; // _Bruno Berselli_, Jun 06 2011

%o (PARI) toprime(n,k)=n<<=2;sum(i=0,k-1,n>>=2;[2,3,5,7][bitand(n,3)+1]*10^i)

%o v=List([25]);for(k=0,9,for(n=0,4^k-1,t=1000*toprime(n,k)+225;if(issquare(t),listput(v,t)))); vecsort(Vec(v)) \\ _Charles R Greathouse IV_, May 14 2013

%o (Python)

%o from math import isqrt

%o def aupto(limit):

%o alst, rootlimit = [], isqrt(limit)

%o for k in range(1, rootlimit+1):

%o if set(str(k*k)) <= set("2357"): alst.append(k*k)

%o return alst

%o print(aupto(7333353225)) # _Michael S. Branicky_, May 15 2021

%Y Cf. A077676, A030485.

%K nonn,base

%O 1,1

%A _Giovanni Teofilatto_, Jun 03 2011

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 September 8 01:34 EDT 2024. Contains 375749 sequences. (Running on oeis4.)