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

A006049 Numbers k such that k and k+1 have the same number of distinct prime divisors.

Original entry on oeis.org

2, 3, 4, 7, 8, 14, 16, 20, 21, 31, 33, 34, 35, 38, 39, 44, 45, 50, 51, 54, 55, 56, 57, 62, 68, 74, 75, 76, 85, 86, 87, 91, 92, 93, 94, 95, 98, 99, 111, 115, 116, 117, 118, 122, 123, 127, 133, 134, 135, 141, 142, 143, 144, 145, 146, 147, 152, 158, 159, 160, 161, 171, 175
Offset: 1

Views

Author

Keywords

Comments

Sequence is infinite, as proved by Schlage-Puchta, who comments: "Buttkewitz found a non-computational proof, and the Goldston-Pintz-Yildirim-sieve yields more precise information". - Charles R Greathouse IV, Jan 09 2013
The asymptotic density of this sequence is 0 (Erdős, 1936). - Amiram Eldar, Sep 17 2024

References

  • Calvin C. Clawson, Mathematical mysteries, Plenum Press, 1996, p. 250.

Crossrefs

Programs

  • Haskell
    import Data.List (elemIndices)
    a006049 n = a006049_list !! (n-1)
    a006049_list = map (+ 1) $ elemIndices 0 $
       zipWith (-) (tail a001221_list) a001221_list
    -- Reinhard Zumkeller, Jan 22 2013
  • Mathematica
    f[n_] := Length@FactorInteger[n];t = f /@ Range[175];Flatten@Position[Rest[t] - Most[t], 0] (* Ray Chandler, Mar 27 2007 *)
    Select[Range[200],PrimeNu[#]==PrimeNu[#+1]&] (* Harvey P. Dale, May 09 2012 *)
    Flatten[Position[Partition[PrimeNu[Range[200]],2,1],?(#[[1]]==#[[2]]&),{1},Heads->False]] (* _Harvey P. Dale, May 22 2015 *)
    SequencePosition[PrimeNu[Range[200]],{x_,x_}][[All,1]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jun 02 2019 *)
  • PARI
    is(n)=omega(n)==omega(n+1) \\ Charles R Greathouse IV, Jan 09 2013
    

Formula

A001221(a(n)) = A001221(a(n)+1). - Reinhard Zumkeller, Jan 22 2013

Extensions

Extended by Ray Chandler, Mar 27 2007

A067003 Number of numbers <= n with same number of distinct prime factors as n.

Original entry on oeis.org

1, 1, 2, 3, 4, 1, 5, 6, 7, 2, 8, 3, 9, 4, 5, 10, 11, 6, 12, 7, 8, 9, 13, 10, 14, 11, 15, 12, 16, 1, 17, 18, 13, 14, 15, 16, 19, 17, 18, 19, 20, 2, 21, 20, 21, 22, 22, 23, 23, 24, 25, 26, 24, 27, 28, 29, 30, 31, 25, 3, 26, 32, 33, 27, 34, 4, 28, 35, 36, 5, 29, 37, 30, 38, 39, 40, 41
Offset: 1

Views

Author

Henry Bottomley, Dec 21 2001

Keywords

Examples

			a(11)=8 since 2,3,4,5,7,8,9,11 each have one distinct prime factor. a(12)=3 since 6,10,12 each have two distinct prime factors.
From _Gus Wiseman_, Dec 28 2018: (Start)
Column n lists the a(n) positive integers less than or equal to n with the same number of distinct prime factors as n:
  1  2  3  4  5  6  7  8  9  10  11  12  13  14  15  16  17  18  19  20
  ---------------------------------------------------------------------
  1  2  3  4  5  6  7  8  9  10  11  12  13  14  15  16  17  18  19  20
        2  3  4     5  7  8  6   9   10  11  12  14  13  16  15  17  18
           2  3     4  5  7      8   6   9   10  12  11  13  14  16  15
              2     3  4  5      7       8   6   10  9   11  12  13  14
                    2  3  4      5       7       6   8   9   10  11  12
                       2  3      4       5           7   8   6   9   10
                          2      3       4           5   7       8   6
                                 2       3           4   5       7
                                         2           3   4       5
                                                     2   3       4
                                                         2       3
                                                                 2
(End)
		

Crossrefs

Programs

  • Mathematica
    Table[Length[Select[Range[n],PrimeNu[#]==PrimeNu[n]&]],{n,100}] (* Gus Wiseman, Dec 28 2018 *)
  • PARI
    a(n) = my(nb = #factor(n)~); sum(k=1, n, #factor(k)~ == nb); \\ Michel Marcus, Jul 13 2019

Formula

a(A002110(n)) = 1.

A294277 Numbers k such that omega(k) < omega(k+1) (where omega(m) = A001221(m), the number of distinct primes dividing m).

Original entry on oeis.org

1, 5, 9, 11, 13, 17, 19, 23, 25, 27, 29, 32, 37, 41, 43, 47, 49, 53, 59, 61, 64, 65, 67, 69, 71, 73, 77, 79, 81, 83, 89, 97, 101, 103, 104, 107, 109, 113, 119, 121, 125, 128, 129, 131, 137, 139, 149, 151, 153, 155, 157, 163, 164, 167, 169, 173, 179, 181, 185
Offset: 1

Views

Author

Rémy Sigrist, Oct 26 2017

Keywords

Comments

This sequence, alongside A006049 and A294278, form a partition of the positive integers.
The asymptotic density of this sequence is 1/2 (Erdős, 1936). - Amiram Eldar, Sep 17 2024

Examples

			omega(1) = 0 < omega(2) = 1, hence 1 belongs to this sequence.
omega(4) = 1 = omega(5) = 1, hence 4 does not belong to this sequence.
omega(6) = 2 > omega(7) = 1, hence 6 does not belong to this sequence.
		

Crossrefs

Programs

A322837 Number of positive integers less than n with fewer distinct prime factors than n.

Original entry on oeis.org

0, 1, 1, 1, 1, 5, 1, 1, 1, 8, 1, 9, 1, 10, 10, 1, 1, 12, 1, 13, 13, 13, 1, 14, 1, 15, 1, 16, 1, 29, 1, 1, 19, 19, 19, 19, 1, 20, 20, 20, 1, 40, 1, 22, 22, 22, 1, 23, 1, 24, 24, 24, 1, 25, 25, 25, 25, 25, 1, 57, 1, 27, 27, 1, 28, 62, 1, 29, 29, 65, 1, 30, 1, 31
Offset: 1

Views

Author

Gus Wiseman, Dec 28 2018

Keywords

Examples

			Column n lists the a(n) positive integers less than n with fewer distinct prime factors than n:
  1  2  3  4  5  6  7  8  9  10  11  12  13  14  15  16  17  18  19  20
  ---------------------------------------------------------------------
     1  1  1  1  5  1  1  1  9   1   11  1   13  13  1   1   17  1   19
                 4           8       9       11  11          16      17
                 3           7       8       9   9           13      16
                 2           5       7       8   8           11      13
                 1           4       5       7   7           9       11
                             3       4       5   5           8       9
                             2       3       4   4           7       8
                             1       2       3   3           5       7
                                     1       2   2           4       5
                                             1   1           3       4
                                                             2       3
                                                             1       2
                                                                     1
		

Crossrefs

Programs

  • Mathematica
    Table[Length[Select[Range[n],PrimeNu[#]
    				
  • PARI
    \\ See Corneth link

A322839 Numbers n with more prime factors (counted with multiplicity) than n+1.

Original entry on oeis.org

4, 6, 8, 10, 12, 16, 18, 20, 22, 24, 28, 30, 32, 36, 40, 42, 45, 46, 48, 50, 52, 54, 56, 58, 60, 64, 66, 68, 70, 72, 76, 78, 80, 81, 82, 84, 88, 90, 92, 96, 100, 102, 104, 105, 106, 108, 110, 112, 114, 117, 120, 126, 128, 130, 132, 136, 138, 140, 144, 148, 150
Offset: 1

Views

Author

Gus Wiseman, Dec 28 2018

Keywords

Comments

First differs from A074827 in having 104.

Examples

			104 has four prime factors (2, 2, 2, 13), while 105 has only three (3, 5, 7), so 104 belongs to the sequence.
		

Crossrefs

Programs

A322840 Positive integers n with fewer prime factors (counted with multiplicity) than n + 1.

Original entry on oeis.org

1, 3, 5, 7, 11, 13, 15, 17, 19, 23, 26, 29, 31, 35, 37, 39, 41, 43, 47, 49, 51, 53, 55, 59, 61, 62, 63, 65, 67, 69, 71, 73, 74, 77, 79, 83, 87, 89, 91, 95, 97, 99, 101, 103, 107, 109, 111, 113, 115, 119, 123, 125, 127, 129, 131, 134, 137, 139, 143, 146, 149
Offset: 1

Views

Author

Gus Wiseman, Dec 28 2018

Keywords

Examples

			49 = 7*7 has two prime factors, while 50 = 2*5*5 has three, so 49 belongs to the sequence.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[100],PrimeOmega[#]?(#[[1]]< #[[2]]&),1,Heads->False]//Flatten (* _Harvey P. Dale, Sep 23 2021 *)
  • PARI
    isok(n) = bigomega(n) < bigomega(n+1); \\ Michel Marcus, Dec 29 2018

A293460 a(n) = Sum_{k=1..n} sign(omega(n+1) - omega(n)) (where omega(m) = A001221(m), the number of distinct primes dividing m).

Original entry on oeis.org

0, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 2, 1, 1, 2, 1, 2, 2, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 1, 2, 2, 2, 2, 1, 2, 2, 2, 1, 2, 1, 2, 2, 2, 1, 2, 1, 2, 2, 2, 1, 2, 2, 2, 2, 2, 1, 2, 1, 2, 2, 1, 2, 3, 2, 3, 3, 4, 3, 4, 3, 4, 4, 4, 4, 5, 4, 5, 4, 5, 4, 5, 4, 4, 4
Offset: 0

Views

Author

Rémy Sigrist, Oct 26 2017

Keywords

Comments

The sign function is defined by:
- sign(0) = 0,
- sign(n) = +1 for any n > 0,
- sign(n) = -1 for any n < 0.
a(n) corresponds to the number of integers up to n in A294277 minus the number of integers up to n in A294278.
The first negative value occurs at a(178) = -1.
Will this sequence change sign indefinitely?

Examples

			The following table shows the first terms of the sequence, alongside sign(omega(n+1)-omega(n)), omega(n+1) and omega(n):
n       a(n)    sign    w(n+1)  w(n)
-       ----    ----    ------  ----
0       0
1       1       1       1       0
2       1       0       1       1
3       1       0       1       1
4       1       0       1       1
5       2       1       2       1
6       1       -1      1       2
7       1       0       1       1
8       1       0       1       1
9       2       1       2       1
10      1       -1      1       2
11      2       1       2       1
12      1       -1      1       2
13      2       1       2       1
14      2       0       2       2
15      1       -1      1       2
16      1       0       1       1
17      2       1       2       1
18      1       -1      1       2
19      2       1       2       1
20      2       0       2       2
		

Crossrefs

Programs

  • Mathematica
    Accumulate[Join[{0},Sign[Differences[PrimeNu[Range[90]]]]]] (* Harvey P. Dale, Dec 25 2024 *)
  • PARI
    s = 0; for (n=1, 87, print1 (s ", "); s += sign(omega(n+1)-omega(n)))

Formula

a(0) = 0, and for any n > 0:
- a(A294277(n)) = a(A294277(n)-1) + 1,
- a(A006049(n)) = a(A006049(n)-1),
- a(A294278(n)) = a(A294278(n)-1) - 1.
Also: a(n) = #{ k / A294277(k) <= n } - #{ k / A294278(k) <= n }.
Showing 1-7 of 7 results.