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.

Previous Showing 11-18 of 18 results.

A205745 a(n) = card { d | d*p = n, d odd, p prime }.

Original entry on oeis.org

0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 2, 0, 1, 1, 1, 0, 2, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 2, 1, 2, 0, 1, 1, 2, 0, 1, 1, 1, 0, 2, 1, 1, 0, 1, 1, 2, 0, 1, 1, 2, 0, 2, 1, 1, 0, 1, 1, 2, 0, 2, 1, 1, 0, 2, 1, 1, 0, 1, 1, 2, 0, 2, 1, 1, 0, 1, 1, 1, 0, 2, 1, 2
Offset: 1

Views

Author

Peter Luschny, Jan 30 2012

Keywords

Comments

Equivalently, a(n) is the number of prime divisors p|n such that n/p is odd. - Gus Wiseman, Jun 06 2018

Crossrefs

Programs

  • Haskell
    a205745 n = sum $ map ((`mod` 2) . (n `div`))
       [p | p <- takeWhile (<= n) a000040_list, n `mod` p == 0]
    -- Reinhard Zumkeller, Jan 31 2012
  • Mathematica
    a[n_] := Sum[ Boole[ OddQ[d] && PrimeQ[n/d] ], {d, Divisors[n]} ]; Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Jun 27 2013 *)
  • PARI
    a(n)=if(n%2,omega(n),n%4/2) \\ Charles R Greathouse IV, Jan 30 2012
    
  • Sage
    def A205745(n):
        return sum((n//d) % 2 for d in divisors(n) if is_prime(d))
    [A205745(n) for n in (1..105)]
    

Formula

O.g.f.: Sum_{p prime} x^p/(1 - x^(2p)). - Gus Wiseman, Jun 06 2018
Sum_{k=1..n} a(k) = (n/2) * (log(log(n)) + B) + O(n/log(n)), where B is Mertens's constant (A077761). - Amiram Eldar, Sep 21 2024

A292587 Compound filter: a(n) = P(A001221(n), A292582(n)), where P(n,k) is sequence A000027 used as a pairing function.

Original entry on oeis.org

0, 1, 1, 2, 1, 3, 1, 4, 2, 3, 1, 5, 1, 3, 3, 7, 1, 5, 1, 5, 3, 3, 1, 8, 2, 3, 4, 5, 1, 6, 1, 11, 3, 3, 3, 23, 1, 3, 3, 8, 1, 6, 1, 5, 5, 3, 1, 12, 2, 5, 3, 5, 1, 8, 3, 8, 3, 3, 1, 9, 1, 3, 5, 22, 3, 6, 1, 5, 3, 6, 1, 38, 1, 3, 5, 5, 3, 6, 1, 12, 7, 3, 1, 9, 3, 3, 3, 8, 1, 9, 3, 5, 3, 3, 3, 17, 1, 5, 5, 23, 1, 6, 1, 8, 6
Offset: 1

Views

Author

Antti Karttunen, Sep 26 2017

Keywords

Comments

This is essentially also a filter constructed from the runlengths of numbers of the form 4k+0 and the runlengths of numbers of the form 4k+2 encountered in trajectories of A005940-tree. See comments in A083399 and A292586.
For all i, j: A291757(i) = A291757(j) => a(i) = a(j), that is, this filter matches to a subset of the sequences matched by filter A291757.
Moreover, for all i, j: a(i) = a(j) <=> A101296(i) = A101296(j), thus the subset is exactly the sequences matched by A101296 (A046523). This follows because the prime signature of n can be recovered from the two components as A046523(n) = A046523(A003557(n)) * A292586(n) and also vice versa as A046523(A003557(n)) = A003557(A046523(n)).

Crossrefs

Formula

a(n) = (1/2)*(2 + ((A001221(n) + A292582(n))^2) - A001221(n) - 3*A292582(n)).

A343943 Number of distinct possible alternating sums of permutations of the multiset of prime factors of n.

Original entry on oeis.org

1, 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, 3, 1, 1, 2, 2, 2, 3, 1, 2, 2, 2, 1, 3, 1, 2, 2, 2, 1, 2, 1, 2, 2, 2, 1, 2, 2, 2, 2, 2, 1, 4, 1, 2, 2, 1, 2, 3, 1, 2, 2, 3, 1, 3, 1, 2, 2, 2, 2, 3, 1, 2, 1, 2, 1, 4, 2, 2, 2
Offset: 1

Views

Author

Gus Wiseman, Aug 19 2021

Keywords

Comments

First differs from A096825 at a(525) = 3, A096825(525) = 4.
First differs from A345926 at a(90) = 4, A345926(90) = 3.
The alternating sum of a sequence (y_1,...,y_k) is Sum_i (-1)^(i-1) y_i. Of course, the alternating sum of prime factors is also the reverse-alternating sum of reversed prime factors.
Also the number of distinct "sums of prime factors" of divisors d|n such that bigomega(d) = bigomega(n)/2 rounded up.

Examples

			The divisors of 525 with 2 prime factors are: 15, 21, 25, 35, with prime factors {3,5}, {3,7}, {5,5}, {5,7}, with distinct sums {8,10,12}, so a(525) = 3.
		

Crossrefs

The half-length submultisets are counted by A114921.
Including all multisets of prime factors gives A305611(n) + 1.
The strict rounded version appears to be counted by A342343.
The version for prime indices instead of prime factors is A345926.
A000005 counts divisors, which add up to A000203.
A001414 adds up prime factors, row sums of A027746.
A056239 adds up prime indices, row sums of A112798.
A071321 gives the alternating sum of prime factors (reverse: A071322).
A097805 counts compositions by alternating (or reverse-alternating) sum.
A103919 counts partitions by sum and alternating sum (reverse: A344612).
A108917 counts knapsack partitions, ranked by A299702.
A276024 and A299701 count positive subset-sums of partitions.
A316524 gives the alternating sum of prime indices (reverse: A344616).
A334968 counts subsequence-sums of standard compositions.

Programs

  • Mathematica
    prifac[n_]:=If[n==1,{},Flatten[ConstantArray@@@FactorInteger[n]]];
    Table[Length[Union[Total/@Subsets[prifac[n],{Ceiling[PrimeOmega[n]/2]}]]],{n,100}]
  • Python
    from sympy import factorint
    from sympy.utilities.iterables import multiset_combinations
    def A343943(n):
        fs = factorint(n)
        return len(set(sum(d) for d in multiset_combinations(fs,(sum(fs.values())+1)//2))) # Chai Wah Wu, Aug 23 2021

A082767 Number of edges in the prime graph.

Original entry on oeis.org

1, 3, 5, 7, 9, 12, 14, 16, 18, 21, 23, 26, 28, 31, 34, 36, 38, 41, 43, 46, 49, 52, 54, 57, 59, 62, 64, 67, 69, 73, 75, 77, 80, 83, 86, 89, 91, 94, 97, 100, 102, 106, 108, 111, 114, 117, 119, 122, 124, 127, 130, 133, 135, 138, 141, 144, 147, 150, 152, 156, 158, 161, 164, 166, 169, 173
Offset: 1

Views

Author

Jon Perry, May 24 2003

Keywords

Comments

The prime graph is defined to be the graph formed by writing the integers 0 to n in a straight line as vertices and then connecting i and j (i > j) iff i-j=1 or i=j+p, where p is a prime factor of i. It can be visualized as the Sieve of Eratosthenes, with each integer connected to its neighbors and the striking out process as a wave forming the remaining edges.

Examples

			a(1) = 1.
a(2) = a(1) + 1 + omega(2) = 1 + 1 + 1 = 3.
a(6) = a(5) + 1 + omega(6) = 9 + 1 + 2 = 12.
		

Crossrefs

Partial sums of A083399.

Programs

  • Magma
    I:=[1]; [n le 1 select I[n] else Self(n-1)+1+#PrimeDivisors(n): n in [1..70]]; // Vincenzo Librandi, Jun 10 2017
  • Mathematica
    Accumulate[PrimeNu[Range[120]] + 1] (* Vincenzo Librandi, Jun 10 2017 *)
  • PARI
    a=1; c=2; while (c<50,print1(a","); a=a+1+omega(c); c++)
    

Formula

a(n) = a(n-1) + 1 + omega(n) if n > 1, with a(1) = 1, where omega(n) is the number of distinct prime factors of n.
a(n) = Sum_{p is 1 or a prime, p <= n} floor(n/p); e.g., a(12) = floor(12/1) + floor(12/2) + floor(12/30) + floor(12/5) + floor(12/7) + floor(12/11) = 12 + 6 + 4 + 2 + 1 + 1 = 26. - Amarnath Murthy, Jul 06 2005

Extensions

Corrected by T. D. Noe, Oct 25 2006

A262095 Number of non-semiprime divisors of n.

Original entry on oeis.org

1, 2, 2, 2, 2, 3, 2, 3, 2, 3, 2, 4, 2, 3, 3, 4, 2, 4, 2, 4, 3, 3, 2, 6, 2, 3, 3, 4, 2, 5, 2, 5, 3, 3, 3, 6, 2, 3, 3, 6, 2, 5, 2, 4, 4, 3, 2, 8, 2, 4, 3, 4, 2, 6, 3, 6, 3, 3, 2, 8, 2, 3, 4, 6, 3, 5, 2, 4, 3, 5, 2, 9, 2, 3, 4, 4, 3, 5, 2, 8, 4, 3, 2, 8, 3, 3, 3, 6, 2, 8, 3, 4, 3, 3, 3, 10, 2
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Sep 11 2015

Keywords

Examples

			(1, 2, 3, 4, 6, 8, 12, 24) are the divisors of n = 24: 1, 2, 3, 8, 12, and 24 are non-semiprimes, therefore a(24) = 6.
		

Crossrefs

Programs

  • Haskell
    a262095 = sum . map ((1 -) . a064911) . a027750_row
    -- Reinhard Zumkeller, Sep 14 2015
  • Mathematica
    Table[Count[Divisors@ n, x_ /; PrimeOmega@ x != 2], {n, 97}] (* Michael De Vlieger, Sep 14 2015 *)
  • PARI
    a(n) = sumdiv(n, d, bigomega(d)!=2); \\ Michel Marcus, Sep 11 2015
    
  • PARI
    a(n)=my(f=factor(n)[,2]); prod(i=1,#f,f[i]+1) - sum(i=1,#f,f[i]>1) - #f*(#f-1)/2 \\ Charles R Greathouse IV, Sep 14 2015
    

Formula

a(n) = A000005(n) - A086971(n).
A083399(n) <= a(n) <= A000005(n).
a(n) = Sum_{k=1..A000005(n)} (1 - A064911(A027750(n,k))). - Reinhard Zumkeller, Sep 14 2015

A275693 Lexicographically earliest increasing sequence such that the a(n)th term of the sequence has n noncomposite divisors.

Original entry on oeis.org

1, 2, 4, 6, 7, 30, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 2310, 2311, 2312, 2313, 2314, 2315, 2316, 2317, 2318, 2319, 2320, 2321, 2322, 2323, 2324, 2325, 2326, 2327, 2328, 2329, 2330
Offset: 1

Views

Author

Jaroslav Krizek, Aug 05 2016

Keywords

Comments

We let tau_nc(n) = number of noncomposite divisors of n = A083399(n) = A001221(n) + 1 = omega(n) + 1.
Primorial numbers from A002110 are terms.

Examples

			a(1)=1 because tau_nc(1)=1; a(2)=2 because tau_nc(2)=2; a(3) cannot be 3 because tau_nc(3)=2, a(3)=4 (4 is the smallest number x>3); if a(3)=4, a(4) must be the smallest number x>a(3) with 3 noncomposite divisors, a(4)=6; a(6) must be number with 4 noncomposite divisors and must keep increase of the sequence, a(6)=30; a(5)=7 because 7>a(4); a(7) must be the smallest number with 5 noncomposite divisors because a(5)=7, a(7)=210; if a(6)=30, a(30) must be the smallest number x>a(7) with 6 noncomposite divisors and must keep increase of the sequence, a(30)=2310; a(8)-a(29) are numbers from interval 211-232; etc...
		

Crossrefs

Formula

tau_nc(a(a(n))) = A083399(a(a(n))) = A001221(a(a(n))) + 1 = omega(a(a(n))) + 1 = n.

A330908 a(n+1) = a(n) + (number of divisors of a(n) that are not divisors of other divisors of a(n)) for n>1; a(1)=1.

Original entry on oeis.org

1, 2, 4, 6, 9, 11, 13, 15, 18, 21, 24, 27, 29, 31, 33, 36, 39, 42, 46, 49, 51, 54, 57, 60, 64, 66, 70, 74, 77, 80, 83, 85, 88, 91, 94, 97, 99, 102, 106, 109, 111, 114, 118, 121, 123, 126, 130, 134, 137, 139, 141, 144, 147, 150, 154, 158, 161, 164, 167, 169
Offset: 1

Views

Author

Keywords

Comments

The sequence is similar built like A094222 but includes 1 as divisor or adds 1 to the number of distinct primes dividing a(n).

Examples

			For n = 2 calculate a(2)= a(2-1) + A083399(a(2-1))= 1 + 1 = 2;
For n = 3 a(3)=a(2) + A083399(a(2))= 2 + 2 = 4;
For n = 4 a(4)=a(3) + A083399(a(3))= 4 + 2 = 6;
For n = 5 a(5)=a(4) + A083399(a(4))= 6 + 3 = 9;
		

Crossrefs

Cf. A094222.

Programs

  • Maple
    A330908 := proc(n) option remember;
        if n < 2 then
            n
        else
            procname(n-1)+A083399(procname(n-1))
        end if;
    end proc:
    seq(A330908(n), n=1..30);
  • Mathematica
    a[1] = 1; a[n_] := a[n] = a[n - 1] + PrimeNu[a[n - 1]] + 1; Array[a, 60] (* Amiram Eldar, May 01 2020 *)
  • PARI
    f(n) = omega(n) + 1; \\ A083399
    lista(nn) = {my(a=1, va = List(a)); for (n=2, nn, a = a+f(a); listput(va, a);); Vec(va);} \\ Michel Marcus, May 03 2020

Formula

a(n) = a(n-1) + A083399(a(n-1)) for n>1.

A332687 a(n) = Sum_{k=1..n} ceiling(n/prime(k)).

Original entry on oeis.org

1, 2, 4, 6, 8, 10, 13, 15, 17, 19, 22, 24, 27, 29, 32, 35, 37, 39, 42, 44, 47, 50, 53, 55, 58, 60, 63, 65, 68, 70, 74, 76, 78, 81, 84, 87, 90, 92, 95, 98, 101, 103, 107, 109, 112, 115, 118, 120, 123, 125, 128, 131, 134, 136, 139, 142, 145, 148, 151, 153
Offset: 1

Views

Author

Ilya Gutkovskiy, Feb 19 2020

Keywords

Crossrefs

Programs

  • Mathematica
    Table[Sum[Ceiling[n/Prime[k]], {k, 1, n}], {n, 1, 60}]
    Table[n + Sum[PrimeNu[k], {k, 1, n - 1}], {n, 1, 60}]
    nmax = 60; CoefficientList[Series[x/(1 - x)^2 + (x/(1 - x)) Sum[x^Prime[k]/(1 - x^Prime[k]), {k, 1, nmax}], {x, 0, nmax}], x] // Rest
    With[{nmax = 100}, Range[nmax] + Join[{0}, Accumulate[Table[PrimeNu[k], {k, 1, nmax - 1}]]]] (* Amiram Eldar, Sep 21 2024 *)
  • PARI
    a(n) = sum(k=1, n, ceil(n/prime(k))); \\ Michel Marcus, Feb 21 2020
    
  • PARI
    lista(nmax) = my(s = 1); for(n = 2, nmax, print1(s, ", "); s += omega(n-1) + 1); \\ Amiram Eldar, Sep 21 2024

Formula

G.f.: x/(1 - x)^2 + (x/(1 - x)) * Sum_{k>=1} x^prime(k) / (1 - x^prime(k)).
a(n) = n + Sum_{k=1..n-1} omega(k), where omega = A001221.
a(n) = n - omega(n) + Sum_{k=1..n} pi(floor(n/k)), where pi = A000720.
a(n) = n + A013939(n-1) for n >= 2. - Amiram Eldar, Sep 21 2024
Previous Showing 11-18 of 18 results.