A380870 a(n) = A381798(n) - A361373(n) - 1.
0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 3, 0, 0, 2, 0, 1, 4, 6, 0, 0, 0, 8, 0, 1, 0, 1, 0, 0, 3, 3, 7, 2, 0, 13, 0, 1, 0, 4, 0, 7, 6, 6, 0, 1, 0, 15, 14, 8, 0, 13, 3, 0, 15, 23, 0, 1, 0, 0, 5, 0, 5, 7, 0, 3, 9, 12, 0, 2, 0, 30, 18, 14, 10, 6, 0, 3, 0, 14, 0
Offset: 1
Keywords
Examples
Table of n, a(n), and H(n) = intersection of row n of A381799 with A024619. n facs(n) a(n) H(n) -------------------------------------------- 6 2 * 3 0 - 10 2 * 5 1 {6} 12 2^2 * 3 0 - 14 2 * 7 0 - 15 3 * 5 3 {6, 10, 12} 18 2 * 3^2 2 {10, 14} 20 2^2 * 5 1 {12} 21 3 * 7 4 {6, 12, 15, 18} 22 2 * 11 6 {6, 10, 12, 14, 18, 20} 24 2^3 * 3 0 - 30 2 * 3 * 5 1 {21} . a(6) = 0 since Q(6) = R(6) = {1,2,3,4}, i.e., all terms in row 6 of A381799 are powers of primes. a(10) = 1 since Q(10) = {1,2,4,5,8} but R(10) = {1,2,4,5,6,8}; the latter set contains 1 term (i.e., 6) that is not a member of the former set. a(14) = 0 since R(14) = {1,2,4,7,8} are all powers of primes. a(15) = 3 since R(15) = {1,3,5,6,9,10,12} has 3 terms {6,10,12} that are not powers of primes. a(18) = 2 since R(18) = {1,2,3,4,8,9,10,14,16} has 2 terms {6,10} that are not powers of primes, etc.
Links
- Michael De Vlieger, Table of n, a(n) for n = 1..16384
Programs
-
Mathematica
f[x_, p_] := Block[{m = 2, r, c}, Which[ PrimePowerQ[x], Join[{0}, #1^Range[0, #2 - 1]] & @@ FactorInteger[x][[1]], PowerMod[p, m, x] == p, {1, p}, True, c[_] := False; c[1] = c[p] = True; {1, p}~Join~ Reap[While[r = PowerMod[p, m, x]; ! c[r], Sow[r]; c[r] = True; m++] ][[-1, 1]] ] ] Table[Count[Union@ Flatten@ Map[f[n, #] &, FactorInteger[n][[All, 1]] ], _?(And[# > 1, ! PrimePowerQ[#]] &)], {n, 120}]
Comments