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!)
A072858 Primes p such that the period of the decimal expansion of 1/p is a square. 2

%I #24 Nov 18 2023 22:24:15

%S 2,3,5,17,101,163,257,577,883,1297,1801,3137,3529,5477,7057,7351,8929,

%T 9397,11831,12101,13457,13553,14401,15361,15377,15973,19841,20809,

%U 21401,21601,23549,24337,25601,29401,30977,33301,33751,33857,38237

%N Primes p such that the period of the decimal expansion of 1/p is a square.

%H Amiram Eldar, <a href="/A072858/b072858.txt">Table of n, a(n) for n = 1..10000</a>

%e The period of 1/17 = 0.05882352941176470588... is 16 = 4^2, hence 17 is in the sequence.

%e The period of 1/163 = 81 = 9^2.

%t Select[Prime[Range[4000]], IntegerQ @ Sqrt[Length[RealDigits[1/#][[1, 1]]]] &] (* _Amiram Eldar_, May 21 2022 *)

%o (PARI) (a(n)=if(n<4,n==2,znorder(Mod(10, prime(n))))); for(n=1,1000,if(issquare(a(n))==1,print1(prime(n),","))) /* Thanks to _Michael Somos_ for improvement of the PARI program */

%Y Cf. A002371.

%K easy,nonn,base

%O 1,1

%A _Benoit Cloitre_, Jul 26 2002

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 20 00:26 EDT 2024. Contains 371798 sequences. (Running on oeis4.)