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-20 of 80 results. Next

A286470 a(n) = maximal gap between indices of successive primes in the prime factorization of n.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, May 13 2017

Keywords

Examples

			For n = 70 = 2*5*7 = prime(1)*prime(3)*prime(4), the largest index difference occurs between prime(1) and prime(3), thus a(70) = 3-1 = 2.
		

Crossrefs

Cf. A286469 (version which considers the index of the smallest prime as the initial gap).
Cf. A000961 (positions of zeros).
Differs from A242411 for the first time at n=70, where a(70) = 2, while A242411(70) = 1.

Programs

  • Mathematica
    Table[If[Or[n == 1, PrimeNu@ n == 1], 0, Max@ Differences@ PrimePi[FactorInteger[n][[All, 1]]]], {n, 120}] (* Michael De Vlieger, May 16 2017 *)
  • Python
    from sympy import primepi, isprime, primefactors, divisors
    def a049084(n): return primepi(n)*(1*isprime(n))
    def a055396(n): return 0 if n==1 else a049084(min(primefactors(n)))
    def x(n): return 1 if n==1 else divisors(n)[-2]
    def a(n): return 0 if n==1 or len(primefactors(n))==1 else max(a055396(x(n)) - a055396(n), a(x(n))) # Indranil Ghosh, May 17 2017
  • Scheme
    (define (A286470 n) (cond ((or (= 1 n) (= 1 (A001221 n))) 0) (else (max (- (A055396 (A032742 n)) (A055396 n)) (A286470 (A032742 n))))))
    

Formula

a(1) = 0, for n > 1, if A001221(n) = 1 [when n is a prime power], a(n) = 0, otherwise a(n) = max((A055396(A032742(n))-A055396(n)), a(A032742(n))).
For all n >= 1, a(n) <= A243055(n).

Extensions

Definition corrected by Zak Seidov, May 16 2017

A355536 Irregular triangle read by rows where row n lists the differences between adjacent prime indices of n; if n is prime, row n is empty.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Jul 12 2022

Keywords

Comments

A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.
The version where zero is prepended to the prime indices is A287352.
One could argue that row n = 1 is empty, but adding it changes only the offset, not the data.

Examples

			Triangle begins (showing n, prime indices, differences*):
   2:    (1)       .
   3:    (2)       .
   4:   (1,1)      0
   5:    (3)       .
   6:   (1,2)      1
   7:    (4)       .
   8:  (1,1,1)    0 0
   9:   (2,2)      0
  10:   (1,3)      2
  11:    (5)       .
  12:  (1,1,2)    0 1
  13:    (6)       .
  14:   (1,4)      3
  15:   (2,3)      1
  16: (1,1,1,1)  0 0 0
		

Crossrefs

Row-lengths are A001222 minus one.
The prime indices are A112798, sum A056239.
Row-sums are A243055.
Constant rows have indices A325328.
The Heinz numbers of the rows plus one are A325352.
Strict rows have indices A325368.
Row minima are A355524.
Row maxima are A286470, also A355526.
An adjusted version is A358169, reverse A355534.

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Table[Differences[primeMS[n]],{n,2,100}]

A359678 Number of multisets (finite weakly increasing sequences of positive integers) with zero-based weighted sum (A359674) equal to n > 0.

Original entry on oeis.org

1, 2, 4, 4, 6, 9, 8, 10, 14, 13, 16, 21, 17, 22, 28, 23, 30, 37, 30, 38, 46, 38, 46, 59, 46, 55, 70, 59, 70, 86, 67, 81, 96, 84, 98, 115, 95, 114, 135, 114, 132, 158, 127, 156, 178, 148, 176, 207, 172, 201, 227, 196, 228, 270, 222, 255, 296, 255, 295, 338, 278
Offset: 1

Views

Author

Gus Wiseman, Jan 15 2023

Keywords

Comments

The zero-based weighted sum of a sequence (y_1,...,y_k) is Sum_{i=1..k} (i-1)*y_i.

Examples

			The a(1) = 1 through a(8) = 10 multisets:
  {1,1}  {1,2}  {1,3}    {1,4}  {1,5}    {1,6}      {1,7}    {1,8}
         {2,2}  {2,3}    {2,4}  {2,5}    {2,6}      {2,7}    {2,8}
                {3,3}    {3,4}  {3,5}    {3,6}      {3,7}    {3,8}
                {1,1,1}  {4,4}  {4,5}    {4,6}      {4,7}    {4,8}
                                {5,5}    {5,6}      {5,7}    {5,8}
                                {1,1,2}  {6,6}      {6,7}    {6,8}
                                         {1,2,2}    {7,7}    {7,8}
                                         {2,2,2}    {1,1,3}  {8,8}
                                         {1,1,1,1}           {1,2,3}
                                                             {2,2,3}
		

Crossrefs

The one-based version is A320387.
Number of appearances of n > 0 in A359674.
The sorted minimal ranks are A359675, reverse A359680.
The minimal ranks are A359676, reverse A359681.
The maximal ranks are A359757.
A053632 counts compositions by zero-based weighted sum.
A124757 gives zero-based weighted sums of standard compositions, rev A231204.

Programs

  • Mathematica
    zz[n_]:=Select[IntegerPartitions[n],UnsameQ@@#&&GreaterEqual @@ Differences[Append[#,0]]&];
    Table[Sum[Append[z,0][[1]]-Append[z,0][[2]],{z,zz[n]}],{n,30}]
  • PARI
    seq(n)={Vec(sum(k=2, (sqrtint(8*n+1)+1)\2, my(t=binomial(k, 2)); x^t/((1-x^t)*prod(j=1, k-1, 1 - x^(t-binomial(j, 2)) + O(x^(n-t+1))))))} \\ Andrew Howroyd, Jan 22 2023

Formula

G.f.: Sum_{k>=2} x^binomial(k,2)/((1 - x^binomial(k,2))*Product_{j=1..k-1} (1 - x^(binomial(k,2)-binomial(j,2)))). - Andrew Howroyd, Jan 22 2023

A257541 The rank of the partition with Heinz number n.

Original entry on oeis.org

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

Views

Author

Emeric Deutsch, May 09 2015

Keywords

Comments

The rank of a partition p is the largest part of p minus the number of parts of p.
The Heinz number of a partition p = [p_1, p_2, ..., p_r] is defined as Product(p_j-th prime, j=1...r) (concept used by Alois P. Heinz in A215366 as an "encoding" of a partition). For example, for the partition [1,1,1] the Heinz number is 2*2*2 = 8. Its rank is 1 - 3 = -2 = a(8). - Emeric Deutsch, Jun 09 2015
This is the Dyson rank (St000145), which is different from the Frobenius rank (St000183); see the FindStat links. - Gus Wiseman, Apr 13 2019

Examples

			a(24) = -2. Indeed, the partition corresponding to the Heinz number 24 = 2*2*2*3 is [1,1,1,2]; consequently, a(24)= 2 - 4 = -2.
		

References

  • G. E. Andrews, K. Eriksson, Integer Partitions, Cambridge Univ. Press, Cambridge, 2004.

Crossrefs

Positions of 0's are A106529. Positions of 1's are A325233. Positions of -1's are A325234.

Programs

  • Maple
    with(numtheory): a := proc(n) options operator, arrow: pi(max(factorset(n)))-bigomega(n) end proc: seq(a(n), n = 2 .. 120);
  • Mathematica
    Table[PrimePi@ FactorInteger[n][[-1, 1]] - PrimeOmega@ n, {n, 2, 76}] (* Michael De Vlieger, May 09 2015 *)

Formula

a(n) = q(largest prime factor of n) - bigomega(n), where q(p) is defined by q-th prime = p while bigomega(n) is the number of prime factors of n, including multiplicities.

A372441 Number of binary indices (binary weight) of n minus number of prime indices (bigomega) of n.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, May 07 2024

Keywords

Comments

A binary index of n is any position of a 1 in its reversed binary expansion. The binary indices of n are row n of A048793.
A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.

Crossrefs

Positions of zeros are A071814.
For sum instead of length we have A372428, zeros A372427.
For minimum instead of length we have A372437, zeros {}.
For maximum instead of length we have A372442, zeros A372436.
Positions of odd terms are A372590, even A372591.
A003963 gives product of prime indices.
A019565 gives Heinz number of binary indices, adjoint A048675.
A029837 gives greatest binary index, least A001511.
A048793 lists binary indices, length A000120, reverse A272020, sum A029931.
A061395 gives greatest prime index, least A055396.
A070939 gives length of binary expansion.
A112798 lists prime indices, length A001222, reverse A296150, sum A056239.

Programs

  • Maple
    f:= proc(n) convert(convert(n,base,2),`+`)-numtheory:-bigomega(n) end proc:
    map(f, [$1..100]); # Robert Israel, May 22 2024
  • Mathematica
    bix[n_]:=Join@@Position[Reverse[IntegerDigits[n,2]],1];
    prix[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Table[Length[bix[n]]-Length[prix[n]],{n,100}]

Formula

a(n) = A000120(n) - A001222(n).

A359755 Positions of first appearances in the sequence of weighted sums of prime indices (A304818).

Original entry on oeis.org

1, 2, 3, 4, 6, 7, 8, 10, 12, 15, 16, 18, 20, 24, 26, 28, 36, 40, 46, 48, 50, 52, 56, 62, 68, 74, 76, 86, 88, 92, 94, 106, 107, 118, 122, 124, 131, 134, 136, 142, 146, 152, 158, 164, 166, 173, 178, 188, 193, 194, 199, 202, 206, 214, 218, 226, 229, 236, 239, 254
Offset: 1

Views

Author

Gus Wiseman, Jan 15 2023

Keywords

Comments

A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.
The weighted sum of a sequence (y_1,...,y_k) is Sum_{i=1..k} i*y_i.

Examples

			The terms together with their prime indices begin:
    1: {}
    2: {1}
    3: {2}
    4: {1,1}
    6: {1,2}
    7: {4}
    8: {1,1,1}
   10: {1,3}
   12: {1,1,2}
   15: {2,3}
   16: {1,1,1,1}
   18: {1,2,2}
   20: {1,1,3}
   24: {1,1,1,2}
		

Crossrefs

The version for standard compositions is A089633, zero-based A359756.
Positions of first appearances in A304818, reverse A318283.
The zero-based version is A359675, unsorted A359676.
The reverse zero-based version is A359680, unsorted A359681.
This is the sorted version of A359682, reverse A359679.
The reverse version is A359754.
A053632 counts compositions by weighted sum.
A112798 lists prime indices, length A001222, sum A056239.
A320387 counts multisets by weighted sum, zero-based A359678.
A358136 lists partial sums of prime indices, ranked by A358137, rev A359361.

Programs

  • Mathematica
    nn=1000;
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    ots[y_]:=Sum[i*y[[i]],{i,Length[y]}];
    seq=Table[ots[primeMS[n]],{n,1,nn}];
    Select[Range[nn],FreeQ[seq[[Range[#-1]]],seq[[#]]]&]

A324517 Numbers > 1 where the maximum prime index equals the number of prime factors minus the number of distinct prime factors.

Original entry on oeis.org

4, 24, 27, 36, 54, 80, 200, 224, 240, 360, 405, 500, 540, 600, 625, 672, 675, 704, 784, 810, 900, 1008, 1120, 1125, 1250, 1350, 1500, 1512, 1664, 1701, 1875, 2112, 2250, 2268, 2352, 2744, 2800, 3168, 3360, 3402, 3520, 3528, 3750, 3872, 3920, 3969, 4352, 4752
Offset: 1

Views

Author

Gus Wiseman, Mar 06 2019

Keywords

Comments

A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.
Also Heinz numbers of the integer partitions enumerated by A324518. The Heinz number of an integer partition (y_1, ..., y_k) is prime(y_1) * ... * prime(y_k).

Examples

			The sequence of terms together with their prime indices begins:
    4: {1,1}
   24: {1,1,1,2}
   27: {2,2,2}
   36: {1,1,2,2}
   54: {1,2,2,2}
   80: {1,1,1,1,3}
  200: {1,1,1,3,3}
  224: {1,1,1,1,1,4}
  240: {1,1,1,1,2,3}
  360: {1,1,1,2,2,3}
  405: {2,2,2,2,3}
  500: {1,1,3,3,3}
  540: {1,1,2,2,2,3}
  600: {1,1,1,2,3,3}
  625: {3,3,3,3}
  672: {1,1,1,1,1,2,4}
  675: {2,2,2,3,3}
  704: {1,1,1,1,1,1,5}
  784: {1,1,1,1,4,4}
  810: {1,2,2,2,2,3}
  900: {1,1,2,2,3,3}
		

Crossrefs

Programs

  • Mathematica
    Select[Range[2,1000],With[{f=FactorInteger[#]},PrimePi[f[[-1,1]]]==Total[Last/@f]-Length[f]]&]

Formula

A061395(a(n)) = A001222(a(n)) - A001221(a(n)) = A046660(a(n)).

A251728 Semiprimes p*q for which p <= q < p^2.

Original entry on oeis.org

4, 6, 9, 15, 21, 25, 35, 49, 55, 65, 77, 85, 91, 95, 115, 119, 121, 133, 143, 161, 169, 187, 203, 209, 217, 221, 247, 253, 259, 287, 289, 299, 301, 319, 323, 329, 341, 361, 377, 391, 403, 407, 437, 451, 473, 481, 493, 517, 527, 529, 533, 551, 559, 583, 589, 611, 629, 649, 667, 671, 689, 697, 703
Offset: 1

Views

Author

Antti Karttunen, Dec 16 2014

Keywords

Comments

Semiprimes p*q for which there exists r <= q such that r^k <= p <= q < r^(k+1), for some k >= 1, i.e., semiprimes whose both prime factors fit inside a semiopen range of two consecutive powers of some natural number r which itself is not greater than the larger prime factor. If such r exists, then it must be <= p (the smaller prime factor of n), which forces q to be less than p^2. On the other hand, when p <= q < p^2, then setting r = p and k = 1 satisfies the equation r^k <= p <= q < r^(k+1).
Assuming that A054272(n), the number of primes in interval [p(n), p(n)^2], is nondecreasing (implied for example if Legendre's or Brocard's conjecture is true), it follows that for any a(n), A003961(a(n)) is also in sequence. In other words, whenever prime(i)*prime(j) is in the sequence, then so is also prime(i+1)*prime(j+1).
From above would follow also that these are all the "settled semiprimes" that occur in a square array A083221 constructed from the sieve of Eratosthenes, from the level A251719 downward. Furthermore, this sequence would then be an infinite disjoint union of sequences of A003961-iterates starting from the initial values given in A251724.
See also the comments in the complementary sequence of semiprimes, A138511.
Composite numbers n with all prime factors greater than the cube root of n. - Doug Bell, Oct 27 2015
If "p <= q" in the definition were changed to "p < q" then the squares of primes (A001248) would be removed, yielding A138109. - Jon E. Schoenfield, Dec 27 2022

Crossrefs

An intersection of A251726 and A001358 (semiprimes).
Complement of A138511 in A001358.
A251724 after the initial 2 is a subsequence.

Programs

  • Haskell
    a251728 n = a251728_list !! (n-1)
    a251728_list = filter f [1..] where
                          f x = q < p ^ 2 && a010051' q == 1
                                where q = div x p; p = a020639 x
    -- Reinhard Zumkeller, Jan 06 2015
    
  • Mathematica
    fQ[n_] := Block[{pf = FactorInteger@ n, p, q}, p = pf[[1, 1]]; q = pf[[-1, 1]]; And[p <= q < p^2, PrimeOmega@ n == 2]]; Select[Range@ 720, fQ] (* Michael De Vlieger, Oct 27 2015 *)
  • PARI
    lista(nn) = forcomposite(n=1, nn, my(f = factor(n));if (#select(x->(x > n^(1/3)), f[,1]) == #f~, print1(n, ", "))); \\ Michel Marcus, Oct 27 2015
    
  • PARI
    list(lim)=my(v=List()); forprime(q=2,sqrtnint((lim\1)^2,3), forprime(p=sqrtint(q)+1,min(q,lim\q), listput(v,p*q))); Set(v) \\ Charles R Greathouse IV, Oct 27 2015
    
  • Python
    from math import isqrt
    from sympy import primepi, primerange
    def A251728(n):
        def bisection(f,kmin=0,kmax=1):
            while f(kmax) > kmax: kmax <<= 1
            kmin = kmax >> 1
            while kmax-kmin > 1:
                kmid = kmax+kmin>>1
                if f(kmid) <= kmid:
                    kmax = kmid
                else:
                    kmin = kmid
            return kmax
        def f(x): return int(n+x+((t:=primepi(s:=isqrt(x)))*(t-1)>>1)-sum(primepi(min(x//p,p**2)) for p in primerange(s+1)))
        return bisection(f,n,n) # Chai Wah Wu, Mar 05 2025

Formula

For all n >= 1, A078898(a(n)) = A243055(a(n)) + 2.
Limit_{n->oo} n*log(a(n))/a(n) = log(2). - Alain Rocchelli, Nov 10 2022

A355534 Irregular triangle read by rows where row n lists the augmented differences of the reversed prime indices of n.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Jul 12 2022

Keywords

Comments

A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.
The augmented differences aug(q) of a (usually weakly decreasing) sequence q of length k are given by aug(q)i = q_i - q{i+1} + 1 if i < k and aug(q)_k = q_k. For example, we have aug(6,5,5,3,3,3) = (2,1,3,1,1,3).
One could argue that row n = 1 is empty, but adding it changes only the offset, not the data.

Examples

			Triangle begins:
   2: 1
   3: 2
   4: 1 1
   5: 3
   6: 2 1
   7: 4
   8: 1 1 1
   9: 1 2
  10: 3 1
  11: 5
  12: 2 1 1
  13: 6
  14: 4 1
  15: 2 2
  16: 1 1 1 1
For example, the reversed prime indices of 825 are (5,3,3,2), which have augmented differences (3,1,2,2).
		

Crossrefs

Crossrefs found in the link are not repeated here.
Row-lengths are A001222.
Row-sums are A252464
Other similar triangles are A287352, A091602.
Constant rows have indices A307824.
The Heinz numbers of the rows are A325351.
Strict rows have indices A325366.
Row minima are A355531, non-augmented A355524, also A355525.
Row maxima are A355535, non-augmented A286470, also A355526.
The non-augmented version is A355536, also A355533.
A112798 lists prime indices, sum A056239.

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    aug[y_]:=Table[If[i
    				

A372428 Sum of binary indices of n minus sum of prime indices of n.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 2, 1, 1, 2, 2, 3, 2, 4, 5, 1, -1, 2, 0, 3, 3, 4, 2, 4, 4, 4, 6, 6, 3, 8, 4, 1, 0, 0, 2, 3, -2, 2, 4, 4, -2, 5, -1, 6, 7, 5, 1, 5, 4, 6, 5, 6, -1, 9, 9, 8, 6, 6, 1, 11, 1, 8, 13, 1, -1, 1, -9, 1, 0, 4, -7, 4, -9, 0, 6, 4, 6, 7, -5, 5, 5, 0, -8
Offset: 1

Views

Author

Gus Wiseman, May 02 2024

Keywords

Comments

A binary index of n is any position of a 1 in its reversed binary expansion. The binary indices of n are row n of A048793.
A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.

Examples

			The binary indices of 65 are {1,7}, and the prime indices are {3,6}, so a(65) = 8 - 9 = -1.
		

Crossrefs

Positions of zeros are A372427.
For minimum instead of sum we have A372437.
For length instead of sum we have A372441, zeros A071814.
For maximum instead of sum we have A372442, zeros A372436.
Positions of odd terms are A372586, even A372587.
A003963 gives product of prime indices.
A019565 gives Heinz number of binary indices, adjoint A048675.
A029837 gives greatest binary index, least A001511.
A048793 lists binary indices, length A000120, reverse A272020, sum A029931.
A061395 gives greatest prime index, least A055396.
A070939 gives length of binary expansion.
A096111 gives product of binary indices.
A112798 lists prime indices, length A001222, reverse A296150, sum A056239.
A326031 gives weight of the set-system with BII-number n.

Programs

  • Mathematica
    prix[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    bix[n_]:=Join@@Position[Reverse[IntegerDigits[n,2]],1];
    Table[Total[bix[n]]-Total[prix[n]],{n,100}]
  • Python
    from itertools import count, islice
    from sympy import sieve, factorint
    def a_gen():
        for n in count(1):
            b = sum((i+1) for i, x in enumerate(bin(n)[2:][::-1]) if x =='1')
            p = sum(sieve.search(i)[0] for i in factorint(n, multiple=True))
            yield(b-p)
    A372428_list = list(islice(a_gen(), 83)) # John Tyler Rascoe, May 04 2024
    
  • Python
    from sympy import primepi, factorint
    def A372428(n): return int(sum(i for i, j in enumerate(bin(n)[:1:-1],1) if j=='1')-sum(primepi(p)*e for p, e in factorint(n).items())) # Chai Wah Wu, Oct 18 2024

Formula

a(n) = A029931(n) - A056239(n).
Previous Showing 11-20 of 80 results. Next