OFFSET
1,10
COMMENTS
It can be shown that the unsolved problem of finding a composite solution n of the congruence n-1 = 1 mod phi(n) is equivalent to finding a squarefree composite number n such that a(n) = 1.
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..20000
C. Rivera, Puzzle 248, The Prime Puzzles and Problems Connection.
FORMULA
EXAMPLE
Let n = 10; then Product_{p is a prime factor of 10} p = 2*5 = 10, Product_{p is a prime factor of 10} p-1 = (2-1) * (5-1) = 1*4 = 4, so a(10) = 10 mod 4 = 2.
MATHEMATICA
p[n_] := Transpose[FactorInteger[n]][[1]]; t = Table[p[i], {i, 2, 100}]; r = {}; s = {}; For[i = 1, i <= 99, i++, r = Append[r, Product[t[[i]][[j]], {j, 1, Length[t[[i]]]}]]; s = Append[s, Product[t[[i]][[j]] - 1, {j, 1, Length[t[[i]]]}]]]; Mod[r, s]
PROG
(PARI)
A007947(n) = factorback(factorint(n)[, 1]); \\ This function from Andrew Lelechenko, May 09 2014
A173557(n) = my(f=factor(n)[, 1]); prod(k=1, #f, f[k]-1); \\ This function from Michel Marcus, Oct 31 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Joseph L. Pe, Jan 04 2004
EXTENSIONS
Term a(1) = 0 prepended by Antti Karttunen, Feb 25 2018
STATUS
approved