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-3 of 3 results.

A372000 a(n) = product of primes p such that floor(n/p) is odd.

Original entry on oeis.org

1, 2, 6, 3, 15, 10, 70, 35, 105, 42, 462, 77, 1001, 286, 4290, 2145, 36465, 24310, 461890, 46189, 969969, 176358, 4056234, 676039, 3380195, 520030, 1560090, 111435, 3231615, 430882, 13357342, 6678671, 220396143, 25928958, 907513530, 151252255, 5596333435, 589087730, 22974421470, 2297442147
Offset: 1

Views

Author

Michael De Vlieger, Apr 15 2024

Keywords

Comments

The only primes in the sequence are 2 and 3.
We can approach the sequence in a manner akin to A260850, a variant of A008336. Set k = 1. Then for all prime factors p | n, if p | k, divide k by p, otherwise multiply k by p. Then we set a(n) = k. This accounts for the "toggling on or off" of prime factors as n increases.
For n >= 1, A055773(n) | a(n), where A055773(n) = A034386(n) / A034386(floor(n/2)).

Examples

			a(1) = 1 since n = 1 is the empty product.
a(2) = 2 since for n = 2, floor(n/p) = floor(2/2) = 1 is odd.
a(3) = 6 since for n = 3 and p = 2, floor(3/2) = 1 is odd, and for p = 3, floor(3/3) = 1 is odd. Hence a(3) = 2*3 = 6.
a(4) = 3 since for n = 4 and p = 2, floor(4/2) = 2 is even, but for p = 3, floor(4/3) = 1 is odd. Therefore, a(n) = 3.
a(5) = 15 since for n = 5, though floor(5/2) = 2 is even, floor(5/3) and floor(5/5) are both odd. Therefore, a(n) = 3*5 = 15, etc.
Table relating a(n) with b(n), diagramming prime factors with "x" that produce a(n), or powers of 2 with "x" that sum to b(n), where b(n) = A371906(n).
                Prime factor
                    1111
   n      b(n)  23571379   b(n)
  ----------------------------
   1        1   .            0
   2        2   x            1
   3        6   xx           3
   4        3   .x           2
   5       15   .xx          6
   6       10   x.x          5
   7       70   x.xx        13
   8       35   ..xx        12
   9      105   .xxx        14
  10       42   xx.x        11
  11      462   xx.xx       27
  12       77   ...xx       24
  13     1001   ...xxx      56
  14      286   x...xx      49
  15     4290   xxx.xx      55
  16     2145   .xx.xx      54
  17    36465   .xx.xxx    118
  18    24310   x.x.xxx    117
  19   461890   x.x.xxxx   245
  20    46189   ....xxxx   240
  ----------------------------
                01234567
                Power of 2
		

Crossrefs

Programs

  • Mathematica
    Table[Times @@ Select[Prime@ Range@ PrimePi[n], OddQ@ Quotient[n, #] &], {n, 40}] (* or *)
    Table[Product[Prime[i], {j, 1 + Floor[PrimePi[n]/2]}, {i, 1 + PrimePi[Floor[n/(2 j)]], PrimePi[Floor[n/(2 j - 1)]]}], {n, 40}]
  • PARI
    a(n) = vecprod(select(x->((n\x) % 2), primes([1, n]))); \\ Michel Marcus, Apr 16 2024
    
  • SageMath
    print([prod(p for p in prime_range(n + 1) if is_odd(n//p)) for n in range(1, 41)])
    # Peter Luschny, Apr 16 2024

Formula

a(n) = Product_{k = 1..floor(pi(n)/2)+1} Product_{j = 1+floor(n/(2*k))..floor(n/(2*k-1))} prime(j), where pi(x) = A000720(n).

A371907 a(n) = sum of 2^(k-1) such that floor(n/prime(k)) is even.

Original entry on oeis.org

0, 0, 0, 1, 1, 2, 2, 3, 1, 4, 4, 7, 7, 14, 8, 9, 9, 10, 10, 15, 5, 20, 20, 23, 19, 50, 48, 57, 57, 62, 62, 63, 45, 108, 96, 99, 99, 226, 192, 197, 197, 206, 206, 223, 217, 472, 472, 475, 467, 470, 404, 437, 437, 438, 418, 427, 297, 808, 808, 815, 815, 1838, 1828
Offset: 1

Views

Author

Michael De Vlieger, Apr 17 2024

Keywords

Comments

This is a transform of A372007(n) = s(n). Write the prime indices of k factors prime(k) | s(n) instead as 2^(k-1) and take the sum for all primes p | s(n). Hence, s(14) = 105 = 3*5*7 becomes a(14) = 2^1 + 2^2 + 2^3 = 2 + 4 + 8 = 14.

Examples

			a(1) = 0 since n = 1 is the empty product.
a(2) = 0 since for n = prime(1) = 2, floor(2/2) = 1 is odd. Therefore a(2) = 0.
a(3) = 0 since for n = 3 and prime(1) = 2, floor(3/2) = 1 is odd, and for prime(2) = 3, floor(3/3) = 1 is odd. Hence a(3) = 0.
a(4) = 1 since for n = 4 and prime(1) = 2, floor(4/2) = 2 is even, but for prime(2) = 3, floor(4/3) = 1 is odd. Therefore, a(4) = 2^(1-1) = 1.
a(8) = 1 since for n = 8, both floor(8/2) and floor(8/3) are even, but both floor(8/5) and floor(8/7) are odd. Therefore, a(8) = 2^(1-1) + 2^(2-1) = 1 + 2 = 3, etc.
Table relating a(n) with b(n), s(n), and t(n), diagramming powers of 2 with "x" that sum to a(n) or b(n), or prime factors with "x" that produce s(n) or t(n). Sequences s(n) = A372007(n), t(n) = A372000(n), c(n) = A034386(n), b(n) = A371906(n), and c(n) = A357215(n) = a(n) + b(n). Column A (at top) shows powers of 2 that sum to a(n), with B same for b(n), while column S represents prime factors of s(n), T same of t(n).
      [A] 2^k     [B] 2^k
   n   0123  a(n)  012345  b(n)   c(n)   s(n)   t(n)  v(n)
  --------------------------------------------------------
   1   .       0   .         0   2^0-1     1      1   P(0)
   2   .       0   x         1   2^1-1     1      2   P(1)
   3   .       0   xx        3   2^2-1     1      6   P(2)
   4   x       1   .x        2   2^2-1     2      3   P(2)
   5   x       1   .xx       6   2^3-1     2     15   P(3)
   6   .x      2   x.x       5   2^3-1     3     10   P(3)
   7   .x      2   x.xx     13   2^4-1     3     70   P(4)
   8   xx      3   ..xx     12   2^4-1     6     35   P(4)
   9   x       1   .xxx     14   2^4-1     2    105   P(4)
  10   ..x     4   xx.x     11   2^4-1     5     42   P(4)
  11   ..x     4   xx.xx    27   2^5-1     5    462   P(5)
  12   xxx     7   ...xx    24   2^5-1    30     77   P(5)
  13   xxx     7   ...xxx   56   2^6-1    30   1001   P(6)
  14   .xxx   14   x...xx   49   2^6-1   105    286   P(6)
  15   ...x    8   xxx.xx   55   2^6-1     7   4290   P(6)
  16   x..x    9   .xx.xx   54   2^6-1    14   2145   P(6)
  --------------------------------------------------------
       2357        [T] 11
       [S]         235713
		

Crossrefs

Programs

  • Mathematica
    Table[Total[2^(-1 + Select[Range@ PrimePi[n], EvenQ@ Quotient[n, Prime[#]] &])], {n, 50}]
  • PARI
    a(n) = my(vp=primes([1, n])); vecsum(apply(x->2^(x-1), Vec(select(x->(((n\x) % 2)==0), vp, 1)))); \\ Michel Marcus, Apr 30 2024

Formula

a(n) = A357215(n) - A371906(n).

A372007 a(n) = product of those prime(k) such that floor(n/prime(k)) is even.

Original entry on oeis.org

1, 1, 1, 2, 2, 3, 3, 6, 2, 5, 5, 30, 30, 105, 7, 14, 14, 21, 21, 210, 10, 55, 55, 330, 66, 429, 143, 2002, 2002, 15015, 15015, 30030, 910, 7735, 221, 1326, 1326, 12597, 323, 3230, 3230, 33915, 33915, 746130, 49742, 572033, 572033, 3432198, 490314, 1225785, 24035
Offset: 1

Views

Author

Michael De Vlieger, Apr 17 2024

Keywords

Comments

The only primes in the sequence are 2, 3, 5, and 7.

Examples

			a(1) = 1 since n = 1 is the empty product.
a(2) = 1 since for n = 2, floor(n/p) = floor(2/2) = 1 is odd.
a(3) = 1 since for n = 3 and p = 2, floor(3/2) = 1 is odd, and for p = 3, floor(3/3) = 1 is odd.
a(4) = 2 since for n = 4 and p = 2, floor(4/2) = 2 is even, but for p = 3, floor(4/3) = 1 is odd. Therefore, a(4) = 2.
a(5) = 2 since for n = 5, though floor(5/2) = 2 is even, floor(5/3) and floor(5/5) are both odd. Therefore, a(5) = 2.
a(8) = 6 since for n = 8, both floor(8/2) and floor(8/3) are even, but both floor(8/5) and floor(8/7) are odd. Therefore, a(8) = 2*3 = 6, etc.
Table relating a(n) with b(n), s(n), and t(n), diagramming prime factors with "x" that produce a(n) or b(n), or powers of 2 with "x" that sum to s(n) or t(n). Sequences b(n) = A372000(n), c(n) = A034386(n), s(n) = A371907(n), t(n) = A371906(n), and v(n) = A357215(n) = s(n) + t(n). Column A represents prime factors of a(n), B same of b(n), while column S (at bottom) shows powers of 2 that sum to s(n), with T same for t(n). P(n) = A002110(n).
       [A]          [B] 11
   n   2357   a(n)  235713    b(n)  c(n)  s(n) t(n)   v(n)
  --------------------------------------------------------
   1   .        1   .           1   P(0)    0    0   2^0-1
   2   .        1   x           2   P(1)    0    1   2^1-1
   3   .        1   xx          6   P(2)    0    3   2^2-1
   4   x        2   .x          3   P(2)    1    2   2^2-1
   5   x        2   .xx        15   P(3)    1    6   2^3-1
   6   .x       3   x.x        10   P(3)    2    5   2^3-1
   7   .x       3   x.xx       70   P(4)    2   13   2^4-1
   8   xx       6   ..xx       35   P(4)    3   12   2^4-1
   9   x        2   .xxx      105   P(4)    1   14   2^4-1
  10   ..x      5   xx.x       42   P(4)    4   11   2^4-1
  11   ..x      5   xx.xx     462   P(5)    4   27   2^5-1
  12   xxx     30   ...xx      77   P(5)    7   24   2^5-1
  13   xxx     30   ...xxx   1001   P(6)    7   56   2^6-1
  14   .xxx   105   x...xx    286   P(6)   14   49   2^6-1
  15   ...x     7   xxx.xx   4290   P(6)    8   55   2^6-1
  16   x..x    14   .xx.xx   2145   P(6)    9   54   2^6-1
  --------------------------------------------------------
       0123         012345
     [S] 2^k        [T] 2^k
		

Crossrefs

Programs

  • Mathematica
    Table[Times @@ Select[Prime@ Range@ PrimePi[n], EvenQ@ Quotient[n, #] &], {n, 51}] (* or *)
    Table[Product[Prime[i], {j, PrimePi[n]}, {i, 1 + PrimePi[Floor[n/(2  j + 1)]], PrimePi[Floor[n/(2  j)]]}], {n, 51}]
  • PARI
    a(n) = my(vp=primes([1, n])); vecprod(select(x->(((n\x) % 2)==0), vp)); \\ Michel Marcus, Apr 30 2024

Formula

a(n) = A034386(n) / A372000(n).
a(n) = Product_{k = 1..pi(n)} Product_{j = 1+floor(n/(2*k+1))..floor(n/(2*k))} prime(j), where pi(x) = A000720(n).
Showing 1-3 of 3 results.