login
A089631
a(n) = (Product_{p is a prime factor of n} p) mod (Product_{p is a prime factor of n} p-1).
1
0, 0, 1, 0, 1, 0, 1, 0, 1, 2, 1, 0, 1, 2, 7, 0, 1, 0, 1, 2, 9, 2, 1, 0, 1, 2, 1, 2, 1, 6, 1, 0, 13, 2, 11, 0, 1, 2, 15, 2, 1, 6, 1, 2, 7, 2, 1, 0, 1, 2, 19, 2, 1, 0, 15, 2, 21, 2, 1, 6, 1, 2, 9, 0, 17, 6, 1, 2, 25, 22, 1, 0, 1, 2, 7, 2, 17, 6, 1, 2, 1, 2, 1, 6, 21, 2, 31, 2, 1, 6, 19, 2, 33, 2, 23, 0, 1, 2, 13
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
C. Rivera, Puzzle 248, The Prime Puzzles and Problems Connection.
FORMULA
a(n) = A007947(n) mod A173557(n). - Antti Karttunen, Feb 25 2018
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
A089631(n) = (A007947(n)%A173557(n)); \\ Antti Karttunen, Feb 25 2018
CROSSREFS
Sequence in context: A129620 A074766 A138107 * A332032 A298878 A195982
KEYWORD
nonn
AUTHOR
Joseph L. Pe, Jan 04 2004
EXTENSIONS
Term a(1) = 0 prepended by Antti Karttunen, Feb 25 2018
STATUS
approved