cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A380870 a(n) = A381798(n) - A361373(n) - 1.

Original entry on oeis.org

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

Views

Author

Michael De Vlieger, Apr 08 2025

Keywords

Comments

a(n) = cardinality of the intersection of A024619 and row n of A381799.
Let S(n,p) = {p^m : p | n, m = 1..floor(log_p n)}. Therefore S(10,2) = {1,2,4,8} and S(30,3) = {1,3,9,27}. Then U({S(n,p) : p|n}) = row n of A377485.
Let T(n,p) = {p^m (mod n) : p | n} the set of prime divisor power residues r (mod n) == p^m, p | n. Thus T(10,2) = {1,2,4,8,6} and T(30,3) = {1,3,9,27,21}. Then U({T(n,p) : p|n}) = row n of A381799.

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.
		

Crossrefs

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}]

Formula

Let Q(n) = {1} joined to row n > 1 of A377485 and let R(n) = row n of A381799.
a(n) = card(U(Q(n) \ R(n))).
a(p^m) = 0 for prime power p^m, m >= 0.
a(n) = 0 for n in A381750.