login
A095246
a(n) is chosen to be the least number such that concatenation a(1)a(2)a(3)...a(n-1)a(n) is congruent to n (mod prime(n)).
1
1, 1, 3, 1, 3, 2, 3, 5, 26, 13, 37, 11, 50, 21, 24, 58, 5, 3, 67, 58, 44, 87, 26, 27, 28, 56, 36, 50, 89, 149, 33, 59, 62, 218, 70, 49, 10, 163, 36, 32, 75, 62, 70, 51, 55, 65, 193, 60, 257, 82, 316, 66, 74, 348, 126, 121, 292, 352, 224, 148, 265, 83, 394, 57, 154, 264, 293, 8
OFFSET
1,3
LINKS
Herman Jamke (hermanjamke(AT)fastmail.fm), Apr 28 2007, Table of n, a(n) for n = 1..100
EXAMPLE
n = 3: prime(3) = 5 and 148 == 3 mod 5.
MATHEMATICA
k = ""; Do[i = 1; While[Mod[ToExpression[ToString[k] <> ToString[i]], Prime[n]] != n, i++ ]; Print[i]; k = k <> ToString[i], {n, 1, 30}] (* Ryan Propper, Jul 02 2005 *)
PROG
(PARI) a=[1]; print1("1, "); for(n=2, 100, m=""; for(i=1, n-1, m=Str(m, a[i])); j=0; p=prime(n); while((eval(Str(m, j))%p) != n, j++); a=concat(a, j); print1(j", ")) \\ Herman Jamke (hermanjamke(AT)fastmail.fm), Apr 28 2007
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Amarnath Murthy, Jun 17 2004
EXTENSIONS
Corrected and extended by Ryan Propper, Jul 02 2005
More terms from Herman Jamke (hermanjamke(AT)fastmail.fm), Apr 28 2007
STATUS
approved