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.

Showing 1-6 of 6 results.

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.

A384442 Smallest k such that A361373(k) = n.

Original entry on oeis.org

1, 2, 4, 6, 10, 12, 18, 40, 36, 30, 60, 102, 84, 132, 150, 264, 210, 540, 330, 420, 660, 630, 840, 1050, 2100, 2340, 2520, 3150, 2310, 2730, 4290, 4620, 6930, 9240, 15960, 16170, 17850, 18480, 20790, 34650, 62370, 68250, 30030, 62790, 60060, 78540, 90090, 117810
Offset: 0

Views

Author

Michael De Vlieger, Jun 12 2025

Keywords

Comments

For n > 1, a(n) is composite, since A361373(p) = 1 for prime p.
For n = 0..2, a(n) = 2^n. For n > 2, a(n) is in A024619.

Examples

			Table of n, a(n) for n = 1..12, showing row a(n) of A377485.
          log n/log p
 n  a(n)  p_1 p_2 p_3  row n of A377485
-------------------------------------------------------------------------
 1:   2   1            {p}
 2:   4   2            {p, p^2}
 3:   6   2   1        {p, q, p^2}
 4:  10   3   1        {p, p^2, q, p^3}
 5:  12   3   2        {p, q, p^2, p^3, q^2}
 6:  18   4   2        {p, q, p^2, p^3, q^2, p^4}
 7:  40   5   2        {p, p^2, q, p^3, p^4, q^2, p^5}
 8:  36   5   3        {p, q, p^2, p^3, q^2, p^4, q^3, p^5}
 9:  30   4   3   2    {p, q, p^2, r, p^3, q^2, p^4, r^2, q^3}
10:  60   5   3   2    {p, q, p^2, r, p^3, q^2, p^4, r^2, q^3, p^5}
11: 102   6   4   1    {p, q, p^2, p^3, q^2, p^4, r, q^3, p^5, p^6, q^4}
12:  84   6   4   2    {p, q, p^2, r, p^3, q^2, p^4, q^3, p^5, r^2, p^6, q^4}
		

Crossrefs

Programs

  • Mathematica
    nn = 30030; t[_] := 0; u = 1; Do[(If[t[#] == 0, t[#] = n]; If[# == u, While[t[u] != 0, u++]]) &[Total@ Map[Floor@ Log[#, n] &, FactorInteger[n][[All, 1]] ] ], {n, 2, nn}]; {1}~Join~Array[t, u - 1]

A377485 Irregular triangle where row n lists powers p^k of primes p | n such that p^k <= n and k > 0.

Original entry on oeis.org

1, 2, 3, 2, 4, 5, 2, 3, 4, 7, 2, 4, 8, 3, 9, 2, 4, 5, 8, 11, 2, 3, 4, 8, 9, 13, 2, 4, 7, 8, 3, 5, 9, 2, 4, 8, 16, 17, 2, 3, 4, 8, 9, 16, 19, 2, 4, 5, 8, 16, 3, 7, 9, 2, 4, 8, 11, 16, 23, 2, 3, 4, 8, 9, 16, 5, 25, 2, 4, 8, 13, 16, 3, 9, 27, 2, 4, 7, 8, 16, 29
Offset: 1

Views

Author

Michael De Vlieger, Oct 29 2024

Keywords

Comments

Row 1 is {1} by convention, since 1 is the empty product.

Examples

			Table of the first 12 rows:
   n   row n
  -------------------
   1:  1;
   2:  2;
   3:  3:
   4:  2, 4;
   5:  5;
   6:  2, 3, 4;
   7:  7;
   8:  2, 4, 8;
   9:  3, 9;
  10:  2, 4, 5, 8;
  11: 11;
  12:  2, 3, 4, 8, 9;
		

Crossrefs

Programs

  • Mathematica
    {{1}}~Join~Table[Union[Join @@ Map[#^Range[Floor@ Log[#, n]] &, FactorInteger[n][[All, 1]] ] ], {n, 2, 30}]

Formula

Row n is { p^k : p | n, k = 1..floor(log n/log p) }, i.e., intersection of A246655 and row n of A162306.
Row p = {p} for prime p.
Row p^k = { p^j : j = 1..k } for prime p and k > 0.
A361373(n) = length of row n for n > 1.

A376504 Number of divisors of n that are both composite and squarefree.

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 4, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 0, 4, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 4, 0, 1, 1, 0, 1, 4, 0, 1, 1, 4, 0, 1, 0, 1, 1, 1, 1, 4, 0, 1, 0, 1, 0, 4, 1, 1, 1
Offset: 1

Views

Author

Michael De Vlieger, Sep 25 2024

Keywords

Comments

Also number of composite and squarefree m <= n such that rad(m) | n, i.e., in row n of A162306, where rad = A007947.
This sequence is distinct from A327517; A327517(210) != a(210).
Record setters are primorials, a(6) = 1, a(30) = 4, a(210) = 11, etc., since primorials P(n) = A002110(n) are the smallest instance of omega(n) = A001221(n).

Crossrefs

Cf. A000005, A000295, A000961, A001221, A002110, A007947, A034444, A120944, A162306, A327517, A361373 (number of prime powers in row n of A162306), A374514 (number of divisors of n that are neither squarefree nor prime powers).

Programs

  • Mathematica
    Array[2^# - # - 1 &@ PrimeNu[#] &, 120]

Formula

a(n) = 2^omega(n) - omega(n) - 1 = A034444(n) - A001221(n) - 1.
a(n) = 0 for n = p^m, where p is prime and m >= 0, i.e., n in A000961.
a(n) = A000295(omega(n)) = A000295(A001221(n)).

A376505 Number of m <= n such that rad(m) | n that are neither squarefree nor prime powers, where rad = A007947.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 2, 0, 1, 0, 0, 0, 3, 0, 0, 0, 1, 0, 4, 0, 0, 0, 0, 0, 4, 0, 0, 0, 2, 0, 5, 0, 1, 1, 0, 0, 5, 0, 3, 0, 1, 0, 6, 0, 2, 0, 0, 0, 11, 0, 0, 1, 0, 0, 7, 0, 1, 0, 5, 0, 7, 0, 0, 2, 1, 0, 8, 0, 4, 0, 0, 0, 11, 0, 0, 0
Offset: 1

Views

Author

Michael De Vlieger, Sep 28 2024

Keywords

Examples

			a(2) = a(4) = a(p^k) = 0 since numbers m <= p^k such that rad(m) | p^k are all divisors that are prime powers p^j, j = 0..k.
a(k) = 0 for k < 12 since 12 is the smallest number that is neither squarefree nor prime powers.
a(12) = 1 since m = 12 is such that 12 <= 12 and rad(12) | 12.
a(18) = 2 since both k = 12 and k = 18 are such that rad(k) | 18.
a(30) = 4 since row 30 of A162306 has 4 numbers that are neither squarefree nor prime powers: {1, 2, 3, 4, 5, 6, 8, 9, 10, [12], 15, 16, [18], [20], [24], 25, 27, 30}, indicated by brackets. (The bracketed numbers happen to be the first 4 terms of A126706.)
		

Crossrefs

Cf. A000005, A000961, A001221, A010846, A126706, A162306, A376504, A361373 (intersection of A246655 and row n of A162306), A376504 (intersection of A120944 and row n of A162306).

Programs

  • Mathematica
    (* Load "theta" program from this A369609/a369609.txt">link in A369609 *)
    {0}~Join~Table[theta[n] - Total@ Map[Floor@ Log[#, n] &, #1] - 2^#2 + #2 & @@ {#, Length[#]} &@ FactorInteger[n][[All, 1]], {n, 2, 120}]
  • PARI
    rad(n) = factorback(factorint(n)[, 1]);
    a(n) = sum(m=1, n, if (!issquarefree(m) && !isprimepower(m), ((n % rad(m))==0))); \\ Michel Marcus, Sep 29 2024

Formula

a(n) = A010846(n) - (Sum_{p|n} floor(log n / log p)) - 2^omega(n) + omega(n), where omega = A001221.
a(n) = A010846(n) - A361373(n) - A376504(n) + 1.
a(n) = 0 for n = p^k, where p is prime and k >= 0, i.e., n in A000961.
Intersection of A126706 and row n of A162306.

A384936 a(n) = Sum_{k=1..n} floor( log(A002110(n)) / log(prime(k)) ).

Original entry on oeis.org

0, 1, 3, 9, 16, 28, 42, 57, 76, 97, 121, 148, 177, 208, 242, 279, 316, 359, 401, 446, 493, 545, 596, 651, 708, 767, 829, 893, 958, 1026, 1096, 1170, 1246, 1319, 1400, 1484, 1567, 1657, 1742, 1834, 1923, 2021, 2119, 2218, 2316, 2419, 2526, 2635, 2745, 2857, 2972
Offset: 0

Views

Author

Michael De Vlieger, Jun 12 2025

Keywords

Comments

A384442(a(n)) = A002110(n) for n <= 8; does it hold for n > 5?

Examples

			Table of n, a(n) for n = 0..10, listing terms in row n of A287010:
      Terms in row n of A287010 corresponding
      to the primes listed in the header
 n\k   2   3   5   7  11  13  17  19  23  29   a(n)
---------------------------------------------------
 0:    0   .   .   .   .   .   .   .   .   .     0
 1:    1   .   .   .   .   .   .   .   .   .     1
 2:    2   1   .   .   .   .   .   .   .   .     3
 3:    4   3   2   .   .   .   .   .   .   .     9
 4:    7   4   3   2   .   .   .   .   .   .    16
 5:   11   7   4   3   3   .   .   .   .   .    28
 6:   14   9   6   5   4   4   .   .   .   .    42
 7:   18  11   8   6   5   5   4   .   .   .    57
 8:   23  14   9   8   6   6   5   5   .   .    76
 9:   27  17  11   9   8   7   6   6   6   .    97
10:   32  20  14  11   9   8   7   7   7   6   121
		

Crossrefs

Programs

  • Mathematica
    P = 2; s = {2}; {0}~Join~Reap[Do[Sow@ Total@ Map[Floor@ Log[#, P] &, s]; (AppendTo[s, #]; P *= #) &[Prime[k]], {k, 2, 51}] ][[-1, 1]]
  • PARI
    a(n) = my(v=primes(n), pp=vecprod(v)); sum(k=1, n, log(pp)\log(v[k])); \\ Michel Marcus, Jun 14 2025

Formula

a(n) = A361373(A002110(n)).
Row sums of A287010.
Showing 1-6 of 6 results.