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

A335097 Number of integers less than n with the same number of prime factors (counted with multiplicity) as n.

Original entry on oeis.org

0, 0, 1, 0, 2, 1, 3, 0, 2, 3, 4, 1, 5, 4, 5, 0, 6, 2, 7, 3, 6, 7, 8, 1, 8, 9, 4, 5, 9, 6, 10, 0, 10, 11, 12, 2, 11, 13, 14, 3, 12, 7, 13, 8, 9, 15, 14, 1, 16, 10, 17, 11, 15, 4, 18, 5, 19, 20, 16, 6, 17, 21, 12, 0, 22, 13, 18, 14, 23, 15, 19, 2, 20, 24, 16, 17, 25, 18, 21, 3
Offset: 1

Views

Author

Ilya Gutkovskiy, Oct 31 2020

Keywords

Examples

			a(10) = 3 because bigomega(10) = 2 and also bigomega(4) = bigomega(6) = bigomega(9) = 2.
		

Crossrefs

Cf. A000079 (positions of 0's), A001222, A047983, A058933, A067004, A322838, A334655.

Programs

  • Maple
    A:= NULL:
    for n from 1 to 100 do
      t:= numtheory:-bigomega(n);
      if not assigned(R[t]) then
        A:= A,0;
        R[t]:= 1;
       else
        A:= A, R[t];
        R[t]:= R[t]+1;
       fi
    od:
    A; # Robert Israel, Oct 24 2021
  • Mathematica
    Table[Length[Select[Range[n - 1], PrimeOmega[#] == PrimeOmega[n] &]], {n, 80}]
  • PARI
    a(n)={my(t=bigomega(n)); sum(k=1, n-1, bigomega(k)==t)} \\ Andrew Howroyd, Oct 31 2020
    
  • Python
    from math import prod, isqrt
    from sympy import isprime, primepi, primerange, integer_nthroot, primeomega
    def A335097(n):
        if n==1: return 0
        if isprime(n): return primepi(n)-1
        def g(x,a,b,c,m): yield from (((d,) for d in enumerate(primerange(b,isqrt(x//c)+1),a)) if m==2 else (((a2,b2),)+d for a2,b2 in enumerate(primerange(b,integer_nthroot(x//c,m)[0]+1),a) for d in g(x,a2,b2,c*b2,m-1)))
        return int(sum(primepi(n//prod(c[1] for c in a))-a[-1][0] for a in g(n,0,1,1,primeomega(n)))-1) # Chai Wah Wu, Aug 28 2024

Formula

a(n) = |{j < n : bigomega(j) = bigomega(n)}|.
a(n) = A058933(n) - 1.

A339512 Number of subsets of {1..n} whose elements have the same number of distinct prime factors.

Original entry on oeis.org

1, 2, 3, 5, 9, 17, 18, 34, 66, 130, 132, 260, 264, 520, 528, 544, 1056, 2080, 2112, 4160, 4224, 4352, 4608, 8704, 9216, 17408, 18432, 34816, 36864, 69632, 69633, 135169, 266241, 270337, 278529, 294913, 327681, 589825, 655361, 786433, 1048577, 1572865, 1572867
Offset: 0

Views

Author

Ilya Gutkovskiy, Dec 07 2020

Keywords

Examples

			a(5) = 17 subsets: {}, {1}, {2}, {3}, {4}, {5}, {2, 3}, {2, 4}, {2, 5}, {3, 4}, {3, 5}, {4, 5}, {2, 3, 4}, {2, 3, 5}, {2, 4, 5}, {3, 4, 5} and {2, 3, 4, 5}.
		

Crossrefs

Programs

  • Python
    from sympy import primefactors
    def test(n):
        if n==0: return -1
        return len(primefactors(n))
    def a(n):
        tests = [test(i) for i in range(n+1)]
        return sum(2**tests.count(v)-1 for v in set(tests))
    print([a(n) for n in range(43)]) # Michael S. Branicky, Dec 07 2020

Formula

a(n) = 1 + Sum_{k=1..n} 2^A334655(k). - Sebastian Karlsson, Feb 18 2021

Extensions

a(23)-a(42) from Michael S. Branicky, Dec 07 2020

A337557 Number of integers less than n with the same number of odd divisors as n.

Original entry on oeis.org

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

Views

Author

Ilya Gutkovskiy, Oct 31 2020

Keywords

Examples

			a(10) = 4 because A001227(10) = 2 and also A001227(3) = A001227(5) = A001227(6) = A001227(7) = 2.
		

Crossrefs

Programs

  • Mathematica
    Table[Length[Select[Range[n - 1], Sum[Mod[d, 2], {d, Divisors[#]}] == Sum[Mod[d, 2], {d, Divisors[n]}] &]], {n, 80}]
  • PARI
    a(n)={my(t=numdiv(n/2^valuation(n, 2))); sum(k=1, n-1, numdiv(k/2^valuation(k, 2))==t)} \\ Andrew Howroyd, Oct 31 2020
    
  • PARI
    first(n) = { my(m = Map(), res = vector(n)); for(i = 1, n, q = numdiv(i >> valuation(i, 2)); if(mapisdefined(m, q), res[i] = mapget(m, q); mapput(m, q, res[i]+1); , mapput(m, q, 1) ) ); res } \\ David A. Corneth, Oct 31 2020

Formula

a(n) = |{j < n : A001227(j) = A001227(n)}|.

A377734 Number of integers less than n that have the same smallest prime factor as n.

Original entry on oeis.org

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

Views

Author

Ilya Gutkovskiy, Nov 05 2024

Keywords

Crossrefs

Programs

  • Mathematica
    Table[Length[Select[Range[n - 1], If[# == 1, 1, FactorInteger[#][[1, 1]]] == If[n == 1, 1, FactorInteger[n][[1, 1]]] &]], {n, 80}]
    seq[len_] := Module[{t = Table[FactorInteger[n][[1,1]], {n, 1, len}], s = Table[0, {len}]}, Do[s[[i]] = Count[t[[1;;i-1]], t[[i]]], {i, 1, len}]; s]; seq[80] (* Amiram Eldar, Nov 21 2024 *)
  • PARI
    a(n) = if (n>1, my(p=vecmin(factor(n)[,1])); sum(k=2, n-1, p == vecmin(factor(k)[,1])), 0); \\ Michel Marcus, Nov 16 2024

Formula

a(n) = |{j < n : lpf(j) = lpf(n)}|.
a(n) = A078898(n) - 1.
Sum_{k=1..n} a(k) ~ c * n^2 / 2, where c = Sum_{k>=1} (A038110(k)/A038111(k))^2 = 0.2847976823663... . - Amiram Eldar, Nov 21 2024

A377730 Number of integers less than n that have the same greatest prime factor as n.

Original entry on oeis.org

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

Views

Author

Ilya Gutkovskiy, Nov 05 2024

Keywords

Crossrefs

Programs

  • Maple
    R:= NULL:
    for n from 1 to 100 do  p:= max(numtheory:-factorset(n));  if assigned(C[p]) then C[p]:= C[p]+1 else C[p]:= 0 fi;
      R:= R, C[p]
    od:R; # Robert Israel, Nov 07 2024
  • Mathematica
    Table[Length[Select[Range[n - 1], FactorInteger[#][[-1, 1]] == FactorInteger[n][[-1, 1]] &]], {n, 90}]

Formula

a(n) = |{j < n : gpf(j) = gpf(n)}|.
a(n) = A078899(n) - 1.
Showing 1-5 of 5 results.