OFFSET
1,1
COMMENTS
LINKS
M. F. Hasler, Nov 10 2006, Table of n, a(n) for n = 1..199
MAPLE
A124271_mod:=proc(n) option remember; local s, i, p; s:=0: for i to n do p:=ithprime(i) mod n: if p<>1 then s:=s+(p&^n - 1)/(p - 1) mod p fi od:s end; A124273 := proc(n::posint) option remember; local p; if n>1 then p:=nextprime( procname(n-1)) else p:=2 fi: while A124271_mod(p)<>0 do p:=nextprime( p ) od: p end # M. F. Hasler, Nov 10 2006
MATHEMATICA
Select[Prime@ Range@ 125, Divisible[Sum[(Prime[i]^# - 1)/(Prime[i] - 1), {i, 1, #}], #] &] (* Michael De Vlieger, Jul 17 2016 *)
PROG
(PARI) isA124273(p) = isprime(p)&&!sum(i=1, p, sum(j=0, p-1, Mod(prime(i), p)^j)) \\ Jianing Song, Oct 20 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
Alexander Adamchuk, Oct 23 2006
STATUS
approved