A077574 Duplicate of A071126.
0, 3, 0, 6, 2, 6, 16, 18, 22, 28, 15, 3, 5, 21, 46, 13, 58, 60, 33, 35, 8, 13, 41, 44, 96, 4, 34
Offset: 1
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.
A002371(11) = 15 because the 11th prime is 31, and 1/31 = 0.03225806451612903225806451612903225806452... has period 15. - _Richard F. Lyon_, Mar 29 2022
seq(subs(FAIL=0,numtheory:-order(10, ithprime(n))),n=1..100); # Robert Israel, Jul 15 2016
Table[ Length[ RealDigits[1 / Prime[n]] [[1, 1]]], {n, 1, 70}] Table[If[IntegerQ[#], #, 0] &[MultiplicativeOrder[10, Prime[n]]], {n, 1, 70}] (* Jan Mangaldan, Jul 07 2020 *)
a(n)=if(n<4,n==2,znorder(Mod(10, prime(n))))
from sympy import prime, n_order def A002371(n): return 0 if n == 1 or n == 3 else n_order(10,prime(n)) # Chai Wah Wu, Feb 07 2022
The repunit R(6)=111111 is the smallest repunit divisible by the prime a(2)=13=2*6+1.
R(n)=(10^n-1)/9; print1(2,", "); forprime(p=3, 1000, m=0; for(q=3, (p-1)/2-1, if(R(q)%p==0, m=1; break));if(m==0&&R((p-1)/2)%p==0, print1(p,", "))) \\ Hugo Pfoertner, Sep 18 2018
Table[If[n == 3, 0, FromDigits[RealDigits[Prime[n-1]/Prime[n]][[1,1]]]], {n, 2, 10}]
Comments