%I #51 Sep 08 2022 08:44:50
%S 11,111,11111,1111111,11111111111,1111111111111,11111111111111111,
%T 1111111111111111111,11111111111111111111111,
%U 11111111111111111111111111111,1111111111111111111111111111111,1111111111111111111111111111111111111
%N 1 repeated prime(n) times.
%C Salomaa's first example of an infinite language. - _N. J. A. Sloane_, Dec 05 2012
%C If p is a prime and gcd(p,b-1)=1, then (b^p-1)/(b-1) == 1 (mod p); by Fermat's little theorem. For example 1111111 == 1 (mod 7). - _Thomas Ordowski_, Apr 09 2016
%D A. Salomaa, Jewels of Formal Language Theory. Computer Science Press, Rockville, MD, 1981, p. 2. - From _N. J. A. Sloane_, Dec 05 2012
%H N. J. A. Sloane, <a href="/A031974/b031974.txt">Table of n, a(n) for n = 1..50</a>
%H Fanel Iacobescu, <a href="http://www.gallup.unm.edu/~smarandache/FANELI.HTM">Smarandache Partition Type Sequences</a>, in Bulletin of Pure and Applied Sciences, India, Vol. 16E, No. 2, 1997, pp. 237-240
%H M. Le and K. Wu, <a href="http://fs.gallup.unm.edu/SNJ9.pdf">The Primes in the Smarandache Unary Sequence</a>, Smarandache Notions Journal, Vol. 9, No. 1-2. 1998, 98-99.
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/SmarandacheSequences.html">Smarandache Sequences</a>
%F a(n) = A000042(A000040(n)). - _Jason Kimberley_, Dec 19 2012
%F a(n) = (10^prime(n) - 1)/9. - _Vincenzo Librandi_, May 29 2014
%p f:=n->(10^ithprime(n)-1)/9; [seq(f(n),n=1..20)]; # _N. J. A. Sloane_, Dec 05 2012
%t Table[FromDigits[PadRight[{},Prime[n],1]],{n,15}] (* _Harvey P. Dale_, Apr 10 2012 *)
%o (Magma) [(10^p-1)/9: p in PrimesUpTo(40)]; // _Vincenzo Librandi_, May 29 2014
%Y A004022 is the subsequence of primes. - _Jeppe Stig Nielsen_, Sep 14 2014
%K nonn,easy,base
%O 1,1
%A J. Castillo (arp(AT)cia-g.com) [Broken email address?]
%E More terms from _Erich Friedman_
%E Corrected and extended by _Harvey P. Dale_, Apr 10 2012