OFFSET
1,3
COMMENTS
LINKS
Antti Karttunen (terms 1..4000) & Altug Alkan, Table of n, a(n) for n = 1..10000
FORMULA
Conjectured: a(n) = A002322(n), except for a(1) = 0 and a(8) = a(24) = 4.
PROG
(PARI) A277030(n) = { my(b, m=0); if(1==n, 0, while(1, m=m+1; b=1; while(((b^eulerphi(n))%n) == ((b^m)%n), b=b+1; if(b>n, return(m))))); }; \\ (Following the description). - Antti Karttunen, Jul 28 2017
(Python)
from sympy import totient
def a(n):
m=0
if n==1: return 0
else:
while True:
m+=1
b=1
while (b**totient(n))%n==(b**m)%n:
b+=1
if b>n: return m
print([a(n) for n in range(1, 101)]) # Indranil Ghosh, Jul 29 2017, after PARI code
CROSSREFS
KEYWORD
nonn
AUTHOR
Thomas Ordowski and Altug Alkan, Sep 25 2016
STATUS
approved