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

A321962 Where the zeros in A123066 occur.

Original entry on oeis.org

1, 51, 53, 7955, 7959, 7961, 7985, 7987, 8245, 8805, 8807, 8809, 8813, 8815, 8817, 8819, 8821, 8825, 8829, 8847, 8851, 8853, 8855, 8857, 8859, 8873, 8877, 8879, 8969, 8973, 8975, 9063, 9079, 9081, 9083, 9089, 9091, 9093, 9095, 9097, 9163, 9165, 9215, 9219
Offset: 1

Views

Author

Peter Luschny, Dec 21 2018

Keywords

Comments

Let pp(n) be the prime parity of n, defined as 1 if the number of distinct primes dividing n is odd and -1 if it is even; by convention pp(1) = 0. The cumulative sum of pp is A123066. We call the initial segment of the integers [1..n] balanced with respect to prime parity if the cumulative sum of pp(n) is 0. [1..a(n)] give the balanced segments.

Crossrefs

Programs

  • Maple
    a_list := proc(len) local omega, c, L, j; c := 0; L := 1;
    omega := n -> nops(numtheory[factorset](n));
    for j from 2 to len do
       c := c + (-1)^omega(j);
       if c = 0 then L := L,j fi
    od; L end: a_list(10000);
  • Mathematica
    A123066[n_] := Join[{0}, Accumulate[Table[-(-1)^PrimeNu[j], {j,2,n}]]];
    A321962List[n_] := Position[A123066[n], 0] // Flatten;
    A321962List[10000]

A030231 Numbers with an even number of distinct prime factors.

Original entry on oeis.org

1, 6, 10, 12, 14, 15, 18, 20, 21, 22, 24, 26, 28, 33, 34, 35, 36, 38, 39, 40, 44, 45, 46, 48, 50, 51, 52, 54, 55, 56, 57, 58, 62, 63, 65, 68, 69, 72, 74, 75, 76, 77, 80, 82, 85, 86, 87, 88, 91, 92, 93, 94, 95, 96, 98, 99, 100, 104, 106, 108, 111, 112, 115, 116, 117, 118, 119
Offset: 1

Views

Author

Keywords

Comments

Gcd(A008472(a(n)), A007947(a(n)))=1; see A014963. - Labos Elemer, Mar 26 2003
Superset of A007774. - R. J. Mathar, Oct 23 2008
A076479(a(n)) = +1. - Reinhard Zumkeller, Jun 01 2013
Union of the rows of A125666 with even indices. - R. J. Mathar, Jul 19 2023

Crossrefs

Programs

  • Haskell
    a030231 n = a030231_list !! (n-1)
    a030231_list = filter (even . a001221) [1..]
    -- Reinhard Zumkeller, Mar 26 2013
  • Mathematica
    Select[Range[200],EvenQ[PrimeNu[#]]&] (* Harvey P. Dale, Jun 22 2011 *)
  • PARI
    j=[]; for(n=1,200,x=omega(n); if(Mod(x,2)==0,j=concat(j,n))); j
    
  • PARI
    is(n)=omega(n)%2==0 \\ Charles R Greathouse IV, Sep 14 2015
    

Formula

From Benoit Cloitre, Dec 08 2002: (Start)
k such that Sum_{d|k} mu(d)*A000005(d) = (-1)^omega(k) = +1 where mu(d)=A008683(d), and omega(d)=A001221(d).
k such that A023900(k) > 0. (End)
Union of A007774, A033993, A074969,... - R. J. Mathar, Jul 22 2025

Extensions

Corrected by Dan Pritikin (pritikd(AT)muohio.edu), May 29 2002

A030230 Numbers that have an odd number of distinct prime divisors.

Original entry on oeis.org

2, 3, 4, 5, 7, 8, 9, 11, 13, 16, 17, 19, 23, 25, 27, 29, 30, 31, 32, 37, 41, 42, 43, 47, 49, 53, 59, 60, 61, 64, 66, 67, 70, 71, 73, 78, 79, 81, 83, 84, 89, 90, 97, 101, 102, 103, 105, 107, 109, 110, 113, 114, 120, 121, 125, 126, 127, 128, 130, 131, 132, 137, 138, 139, 140, 149
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Haskell
    a030230 n = a030230_list !! (n-1)
    a030230_list = filter (odd . a001221) [1..]
    -- Reinhard Zumkeller, Aug 14 2011
    
  • Maple
    q:= n-> is(nops(ifactors(n)[2])::odd):
    select(q, [$1..150])[];  # Alois P. Heinz, Feb 12 2021
  • Mathematica
    (* Prior to version 7.0 *) littleOmega[n_] := Length[FactorInteger[n]]; Select[ Range[2, 149], (-1)^littleOmega[#] == -1 &] (* Jean-François Alcover, Nov 30 2011, after Benoit Cloitre *)
    (* Version 7.0+ *) Select[Range[2, 149], (-1)^PrimeNu[#] == -1 &]
    Select[Range[1000],OddQ[PrimeNu[#]]&] (* Harvey P. Dale, Nov 27 2012 *)
  • PARI
    is(n)=omega(n)%2 \\ Charles R Greathouse IV, Sep 14 2015

Formula

From Benoit Cloitre, Dec 08 2002: (Start)
k such that Sum_{d|k} mu(d)*tau(d) = (-1)^omega(k) = -1 where mu(d) = A008683(d), tau(d) = A000005(d) and omega(d) = A001221(d).
k such that A023900(k) < 0. (End)
gcd(A008472(a(n)), A007947(a(n))) > 1; see A014963. - Labos Elemer, Mar 26 2003
A076479(a(n)) = -1. - Reinhard Zumkeller, Jun 01 2013

A346617 Irregular triangle T(n,m) read by rows (n >= 1, 1 <= m <= Max(A001221([1..n]))): T(n,m) = number of integers in [1,n] with m distinct prime factors.

Original entry on oeis.org

0, 1, 2, 3, 4, 4, 1, 5, 1, 6, 1, 7, 1, 7, 2, 8, 2, 8, 3, 9, 3, 9, 4, 9, 5, 10, 5, 11, 5, 11, 6, 12, 6, 12, 7, 12, 8, 12, 9, 13, 9, 13, 10, 14, 10, 14, 11, 15, 11, 15, 12, 16, 12, 16, 12, 1, 17, 12, 1, 18, 12, 1, 18, 13, 1, 18, 14, 1, 18, 15, 1, 18, 16, 1, 19, 16, 1, 19, 17, 1
Offset: 1

Views

Author

N. J. A. Sloane, Aug 19 2021

Keywords

Comments

Column k >= 1 of the triangle gives the number of numbers i in the range 1 <= i <= n with omega(i) = A001221(i) = k.
A285577 is a similar triangle which has an extra column on the left for k = 0.

Examples

			Rows 1 through 12 are:
1 [0]
2 [1]
3 [2]
4 [3]
5 [4]
6 [4, 1]
7 [5, 1]
8 [6, 1]
9 [7, 1]
10 [7, 2]
11 [8, 2]
12 [8, 3]
13 [9, 3]
		

References

  • G. H. Hardy, Ramanujan: twelve lectures on subjects suggested by his life and work, Cambridge, University Press, 1940, pp. 52-56.
  • Edmund Landau, Handbuch der Lehre von der Verteilung der Primzahlen, Chelsea Publishing, NY 1953, Vol. 1, p. 211, Eq. (5).

Crossrefs

Row lengths give A111972 (for n>1).

Programs

  • Maple
    omega := proc(n) nops(numtheory[factorset](n)) end proc: # # A001221
    A:=Array(1..20,0);
    ans:=[[0]];
    mx:=0;
    for n from 2 to 100 do
    k:=omega(n);
    if k>mx then mx:=k; fi;
    A[k]:=A[k]+1;
    ans:=[op(ans),[seq(A[i],i=1..mx)]];
    od:
    ans;
    # second Maple program:
    b:= proc(n) option remember; `if`(n=0, 0,
          b(n-1)+x^nops(ifactors(n)[2]))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=1..max(1, degree(p))))(b(n)):
    seq(T(n), n=1..40);  # Alois P. Heinz, Aug 19 2021
  • Mathematica
    T[n_] := If[n == 1, {0},
         Range[n] // PrimeNu // Tally // Rest // #[[All, 2]]&];
    Array[T, 40] // Flatten (* Jean-François Alcover, Mar 08 2022 *)

Formula

For fixed k, T(n,k) ~ (1/(k-1)!) * n * (log log n)^(k-1) / log n [Landau].
From Alois P. Heinz, Aug 19 2021: (Start)
Sum_{k>=1} k * T(n,k) = A013939(n).
Sum_{k>=1} k^2 * T(n,k) = A069811(n).
Sum_{k>=1} (-1)^(k-1) * T(n,k) = A123066(n).
Sum_{k>=1} (-1)^k * T(n,k) = -1 + A174863(n).
Sum_{k>=1} T(n,k) = n - 1. (End)
Showing 1-4 of 4 results.