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-10 of 35 results. Next

A188499 Intersection of A089633 and A188341.

Original entry on oeis.org

1, 2, 5, 7, 23, 239
Offset: 0

Views

Author

Vladimir Shevelev, Apr 02 2011

Keywords

Comments

Binomial coefficient predictors in both bases 2 and 3 (for definition, see paper in link).
Next term is > 5*10^300, if it exists.

Crossrefs

Programs

  • Mathematica
    aQ[n_]:= DigitCount[n, 2, 0] < 2 && DigitCount[n, 3, 0] == 0 && DigitCount[n, 3, 1] < 2; Select[Range[1000], aQ] (* Amiram Eldar, Dec 10 2018 *)
  • PARI
    isok2(n) = my(b=binary(n)); #select(x->(x==0), b) <= 1; \\ A089633
    isok3(n) = my(d=digits(n, 3)); (#select(x->(x==0), d) == 0) && (#select(x->(x==1), d) <= 1); \\ A188341
    isok(n) = isok2(n) && isok3(n); \\ Michel Marcus, Dec 10 2018

A188533 Intersection of A089633 and A188531.

Original entry on oeis.org

1, 2, 3, 14, 23, 119, 123
Offset: 1

Views

Author

Vladimir Shevelev, Apr 03 2011

Keywords

Comments

Binomial coefficient predictors in both bases 2 and 5 (for definition, see paper in link).
a(8) > 10^50000 (if it exists). - Pontus von Brömssen, Jul 06 2025
All terms > a(4) = 14 must have all base 5 digits equal to 4 except for exactly one digit 3 which cannot be the initial digit. Indeed, numbers with only 4s in their base-5 expansion are of the form 5^n-1, n > 0, but since 5^n-1 == 1-1 == 0 (mod 4), the binary expansion of such numbers ends in '00'. If the exception is the first digit, we have a number of the form N = (d+1)*5^m-1, where 1 <= d <= 3 is the first digit and m is the number of subsequent digits 4, in base 5. But if d = 1, then N = 2*5^m-1 == 1 (mod 8), since 2*5^m == 2*(-3)^m == 2*(-3 or 1) == 2 (mod 8). That means, N's binary expansion ends in '001'. If d = 2, then N = 3*5^m-1 is even, so it ends in a bit 0, and N/2 has another bit 0 at position p = A001511(m+3)+1 = valuation(m+3, 2)+2 from the right (i.e., the binary digit with value 2^p). If d = 3, then N = 4*5^m-1 == 3 (mod 16), so its binary expansion ends in '0011'. - M. F. Hasler, Jun 28 2025

Crossrefs

Cf. A089633 (numbers having at most one bit 0), A188531 (only 4s in base 5 with at most one exception), A188341 (no 0s and at most one 1 in base 3), A188499, A188529, A188532.

Programs

  • Mathematica
    aQ[n_]:= DigitCount[n, 2, 0] < 2 && Module[{d=IntegerDigits[n,5]}, s=Select[d, #!=4 &]; s=={} || s =={3} || (d[[1]]<3 && s=={d[[1]]})]; Select[Range[100000], aQ] (* Amiram Eldar, Dec 14 2018 *)

Extensions

Incorrect term 4 deleted by Pontus von Brömssen, Jun 28 2025

A188534 Intersection of A089633 and A188532.

Original entry on oeis.org

1, 2, 3, 5, 11, 23, 29
Offset: 1

Views

Author

Vladimir Shevelev, Apr 03 2011

Keywords

Comments

Binomial coefficient predictors in both bases 2 and 6 (for definition, see paper in link).

Crossrefs

A029931 If 2n = Sum 2^e_i, a(n) = Sum e_i.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Write n in base 2, n = sum b(i)*2^(i-1), then a(n) = sum b(i)*i. - Benoit Cloitre, Jun 09 2002
May be regarded as a triangular array read by rows, giving weighted sum of compositions in standard order. The standard order of compositions is given by A066099. - Franklin T. Adams-Watters, Nov 06 2006
Sum of all positive integer roots m_i of polynomial {m,k} - see link [Shevelev]; see also A264613. - Vladimir Shevelev, Dec 13 2015
Also the sum of binary indices of n, where a binary index of n (A048793) is any position of a 1 in its reversed binary expansion. For example, the binary indices of 11 are {1,2,4}, so a(11) = 7. - Gus Wiseman, May 22 2024

Examples

			14 = 8+4+2 so a(7) = 3+2+1 = 6.
Composition number 11 is 2,1,1; 1*2+2*1+3*1 = 7, so a(11) = 7.
The triangle starts:
  0
  1
  2 3
  3 4 5 6
The reversed binary expansion of 18 is (0,1,0,0,1) with 1's at positions {2,5}, so a(18) = 2 + 5 = 7. - _Gus Wiseman_, Jul 22 2019
		

Crossrefs

Other sequences that are built by replacing 2^k in the binary representation with other numbers: A022290 (Fibonacci), A059590 (factorials), A073642, A089625 (primes), A116549, A326031.
Cf. A001793 (row sums), A011782 (row lengths), A059867, A066099, A124757.
Row sums of A048793 and A272020.
Contains exactly A000009(n) copies of n.
For length instead of sum we have A000120, complement A023416.
For minimum instead of sum we have A001511, opposite A000012.
For maximum instead of sum we have A029837 or A070939, opposite A070940.
For product instead of sum we have A096111.
The reverse version is A230877, row sums of A371572.
The reverse complement is A359359, row sums of A371571.
The complement is A359400, row sums of A368494.
Numbers k such that a(k) is prime are A372689.
A014499 lists binary indices of prime numbers.
A019565 gives Heinz number of binary indices, inverse A048675.
A372471 lists binary indices of primes, row-sums A372429.

Programs

  • Haskell
    a029931 = sum . zipWith (*) [1..] . a030308_row
    -- Reinhard Zumkeller, Feb 28 2014
    
  • Maple
    HammingWeight := n -> add(i, i = convert(n, base, 2)):
    a := proc(n) option remember; `if`(n = 0, 0,
    ifelse(n::even, a(n/2) + HammingWeight(n/2), a(n-1) + 1)) end:
    seq(a(n), n = 0..78); # Peter Luschny, Oct 30 2021
  • Mathematica
    a[n_] := (b = IntegerDigits[n, 2]).Reverse @ Range[Length @ b]; Array[a,78,0] (* Jean-François Alcover, Apr 28 2011, after B. Cloitre *)
  • PARI
    for(n=0,100,l=length(binary(n)); print1(sum(i=1,l, component(binary(n),i)*(l-i+1)),","))
    
  • PARI
    a(n) = my(b=binary(n)); b*-[-#b..-1]~; \\ Ruud H.G. van Tol, Oct 17 2023
    
  • Python
    def A029931(n): return sum(i if j == '1' else 0 for i, j in enumerate(bin(n)[:1:-1],1)) # Chai Wah Wu, Dec 20 2022
    (C#)
    ulong A029931(ulong n) {
        ulong result = 0, counter = 1;
        while(n > 0) {
            if (n % 2 == 1)
              result += counter;
            counter++;
            n /= 2;
        }
        return result;
    } // Frank Hollstein, Jan 07 2023

Formula

a(n) = a(n - 2^L(n)) + L(n) + 1 [where L(n) = floor(log_2(n)) = A000523(n)] = sum of digits of A048794 [at least for n < 512]. - Henry Bottomley, Mar 09 2001
a(0) = 0, a(2n) = a(n) + e1(n), a(2n+1) = a(2n) + 1, where e1(n) = A000120(n). a(n) = log_2(A029930(n)). - Ralf Stephan, Jun 19 2003
G.f.: (1/(1-x)) * Sum_{k>=0} (k+1)*x^2^k/(1+x^2^k). - Ralf Stephan, Jun 23 2003
a(n) = Sum_{k>=0} A030308(n,k)*A000027(k+1). - Philippe Deléham, Oct 15 2011
a(n) = sum of n-th row of the triangle in A213629. - Reinhard Zumkeller, Jun 17 2012
From Reinhard Zumkeller, Feb 28 2014: (Start)
a(A089633(n)) = n and a(m) != n for m < A089633(n).
a(n) = Sum_{k=1..A070939(n)} k*A030308(n,k-1). (End)
a(n) = A073642(n) + A000120(n). - Peter Kagey, Apr 04 2016

Extensions

More terms from Erich Friedman

A011371 a(n) = n minus (number of 1's in binary expansion of n). Also highest power of 2 dividing n!.

Original entry on oeis.org

0, 0, 1, 1, 3, 3, 4, 4, 7, 7, 8, 8, 10, 10, 11, 11, 15, 15, 16, 16, 18, 18, 19, 19, 22, 22, 23, 23, 25, 25, 26, 26, 31, 31, 32, 32, 34, 34, 35, 35, 38, 38, 39, 39, 41, 41, 42, 42, 46, 46, 47, 47, 49, 49, 50, 50, 53, 53, 54, 54, 56, 56, 57, 57, 63, 63, 64, 64, 66, 66, 67, 67, 70
Offset: 0

Views

Author

Keywords

Comments

Terms of A005187 repeated. - Lekraj Beedassy, Jul 06 2004
This sequence shows why in binary 0 and 1 are the only two numbers n such that n equals the sum of its digits raised to the consecutive powers (equivalent to the base-10 sequence A032799). 1 raised to any consecutive power is still 1 and thus any sum of digits raised to consecutive powers for any n > 1 falls short of equaling the value of n by the n-th term of this sequence. - Alonso del Arte, Jul 27 2004
Also the number of trailing zeros in the base-2 representation of n!. - Hieronymus Fischer, Jun 18 2007
Partial sums of A007814. - Philippe Deléham, Jun 21 2012
If n is in A089633 and n > 0, then a(n) = n - floor(log_2(n+1)). - Douglas Latimer, Jul 25 2012
For n > 1, denominators of integral numerator polynomials L(n,x) for the Legendre polynomials with o.g.f. 1/sqrt(1 - t*x + x^2). - Tom Copeland, Feb 04 2016
The definition of this sequence explains why, for n > 1, the highest power of 2 dividing n! added to the number of 1's in the binary expansion of n is equal to n. This result is due to the French mathematician Adrien Legendre (1752-1833) [see the Honsberger reference]. - Bernard Schott, Apr 07 2017
a(n) is the total number of 2's in the prime factorizations over the first n positive integers. The expected number of 2's in the factorization of an integer n is 1 (as n->infinity). Generally, the expected number of p's (for a prime p) is 1/(p-1). - Geoffrey Critzer, Jun 05 2017

Examples

			a(3) = 1 because 3 in binary is 11 (two 1's) and 3 - 2 = 1.
a(4) = 3 because 4 in binary is 100 (one 1 and two 0's) and 4 - 1 = 3.
a(5) = 3 because 5 in binary is 101 (a zero between two 1's) and 5 - 2 = 3.
a(100) = 97.
a(10^3) = 994.
a(10^4) = 9995.
a(10^5) = 99994.
a(10^6) = 999993.
a(10^7) = 9999992.
a(10^8) = 99999988.
a(10^9) = 999999987.
G.f. = x^2 + x^3 + 3*x^4 + 3*x^5 + 4*x^6 + 4*x^7 + 7*x^8 + 7*x^9 + 8*x^10 + ...
		

References

  • K. Atanassov, On Some of Smarandache's Problems, section 7, on the 61st problem, page 42, American Research Press, 1999, 16-21.
  • G. Bachman, Introduction to p-Adic Numbers and Valuation Theory, Academic Press, 1964; see Lemma 3.1.
  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 305.
  • H. Davenport, The Higher Arithmetic, 7th ed. 1999, Cambridge University Press, p. 216, exercise 1.07.
  • R. Honsberger, Mathematical Gems II, Dolciani Mathematical Expositions, 1976, pp. 1-6.

Crossrefs

a(n) = Sum_{k=1..n} A007814(k), n >= 1, a(0) = 0.

Programs

  • Haskell
    a011371 n = n - a000120 n  -- Reinhard Zumkeller, Jan 24 2014
    
  • Magma
    [Valuation(Factorial(n), 2): n in [0..80]]; // Bruno Berselli, Aug 05 2013
    
  • Maple
    A011371(n) = RETURN(((2^(l))-1)+sum('(j*floor((n-(2^l)+2^j)/(2^(j+1))))','j'=1..l)); # after K. Atanassov. Here l is [ log2(n) ].
    A011371 := n -> n - add(i,i=convert(n,base,2)): # Peter Luschny, May 02 2009
    read("transforms") : A011371 := proc(n) n-wt(n) ; end proc: # R. J. Mathar, May 15 2013
  • Mathematica
    -1 + Length[ Last[ Split[ IntegerDigits[ 2(n!), 2 ] ] ] ], FoldList[ Plus, 0, Fold[ Flatten[ {#1, #2, #1} ]&, 0, Range[ 6 ] ] ]
    Table[IntegerExponent[n!, 2], {n, 0, 127}]
    Table[n - DigitCount[n, 2, 1], {n, 0, 127}]
    Table[t = 0; p = 2; While[s = Floor[n/p]; t = t + s; s > 0, p *= 2]; t, {n, 0, 100} ]
  • PARI
    {a(n) = if( n<0, 0, valuation(n!, 2))}; /* Michael Somos, Oct 24 2002 */
    
  • PARI
    {a(n) = if( n<0, 0, sum(k=1, n, n\2^k))}; /* Michael Somos, Oct 24 2002 */
    
  • PARI
    {a(n) = if( n<0, 0, n - subst( Pol( binary( n ) ), x, 1))}; /* Michael Somos, Aug 28 2007 */
    
  • PARI
    a(n)=sum(k=1,log(n+1)\log(2),n>>k) \\ Charles R Greathouse IV, Oct 03 2012
    
  • PARI
    a(n)=my(s);while(n>>=1,s+=n);s \\ Charles R Greathouse IV, Aug 09 2013
    
  • PARI
    a(n) = n - hammingweight(n); \\ Michel Marcus, Jun 05 2014
    
  • Python
    [n - bin(n)[2:].count("1") for n in range(101)] # Indranil Ghosh, Apr 09 2017
    
  • Python
    # 3.10+
    def A011371(n): return n-n.bit_count() # Chai Wah Wu, Jul 09 2022

Formula

a(n) = a(floor(n/2)) + floor(n/2) = floor(n/2) + floor(n/4) + floor(n/8) + floor(n/16) + ... - Henry Bottomley, Apr 24 2001
G.f.: A(x) = (1/(1 - x))*Sum_{k>=1} x^(2^k)/(1 - x^(2^k)). - Ralf Stephan, Apr 11 2002
a(n) = n - A000120(n). - Lekraj Beedassy, Sep 01 2003
a(n) = A005187(n) - n, n >= 0.
a(n) = A007814(A000142(n)). - Reinhard Zumkeller, Apr 09 2004
From Hieronymus Fischer, Jun 25 and Aug 13 2007: (Start)
a(n) = Sum_{k=2..n} Sum_{j|k, j >= 2} (floor(log_2(j)) - floor(log_2(j - 1))).
The g.f. can be expressed in terms of a Lambert series, in that g(x) = L[b(k)](x)/(1 - x), where
L[b(k)](x) = Sum_{k>=0} b(k)*x^k/(1 - x^k) is a Lambert series with b(k) = 1, if k is a power of 2, otherwise b(k) = 0.
G.f.: g(x) = (1/(1-x))*Sum_{k>0} c(k)*x^k, where c(k) = Sum_{j>1, j|k} (floor(log_2(j)) - floor(log_2(j-1))).
Recurrence:
a(n) = floor(n/2) + a(floor(n/2));
a(2*n) = n + a(n);
a(n*2^m) = n*(2^m - 1) + a(n).
a(2^m) = 2^m - 1, m >= 0.
Asymptotic behavior:
a(n) = n + O(log(n)),
a(n+1) - a(n) = O(log(n)), which follows from the inequalities below.
a(n) <= n - 1; equality holds for powers of 2.
a(n) >= n - 1 - floor(log_2(n)); equality holds for n = 2^m - 1, m > 0.
lim inf (n - a(n)) = 1, for n->oo.
lim sup (n - log_2(n) - a(n)) = 0, for n->oo.
lim sup (a(n+1) - a(n) - log_2(n)) = 0, for n->oo. (End)
a(n) = Sum_{k >= 0} A030308(n, k)*A000225(k). - Philippe Deléham, Oct 16 2011
a(n) = Sum_{k=0..floor(log_2(n+1))} f^(k+1)(n), where f(n) = (n - (n mod 2))/2 and f^(k+1) is the (k+1)-th composition of f. - Joseph Wheat, Mar 01 2018
a(n) = Sum_{k=1..floor(n/2)} floor(log_2(n/k)). - Ammar Khatab, Feb 01 2025

Extensions

Examples added by Hieronymus Fischer, Jun 06 2012

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[[#]]]&]

A265705 Triangle read by rows: T(n,k) = k IMPL n, 0 <= k <= n, bitwise logical IMPL.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Dec 15 2015

Keywords

Examples

			.          10 | 1010                            12 | 1100
.           4 |  100                             6 |  110
.   ----------+-----                     ----------+-----
.   4 IMPL 10 | 1011 -> T(10,4)=11       6 IMPL 12 | 1101 -> T(12,6)=13
.
First 16 rows of the triangle, where non-symmetrical rows are marked, see comment concerning A158582 and A089633:
.   0:                                 0
.   1:                               1   1
.   2:                             3   2   3
.   3:                           3   3   3   3
.   4:                         7   6   5   4   7    X
.   5:                       7   7   5   5   7   7
.   6:                     7   6   7   6   7   6   7
.   7:                   7   7   7   7   7   7   7   7
.   8:                15  14  13  12  11  10   9   8  15    X
.   9:              15  15  13  13  11  11   9   9  15  15    X
.  10:            15  14  15  14  11  10  11  10  15  14  15    X
.  11:          15  15  15  15  11  11  11  11  15  15  15  15
.  12:        15  14  13  12  15  14  13  12  15  14  13  12  15    X
.  13:      15  15  13  13  15  15  13  13  15  15  13  13  15  15
.  14:    15  14  15  14  15  14  15  14  15  14  15  14  15  14  15
.  15:  15  15  15  15  15  15  15  15  15  15  15  15  15  15  15  15 .
		

Crossrefs

Cf. A003817, A007088, A029578, A089633, A158582, A247648, A265716 (central terms), A265736 (row sums).
Other triangles: A080099 (AND), A080098 (OR), A051933 (XOR), A102037 (CNIMPL).

Programs

  • Haskell
    a265705_tabl = map a265705_row [0..]
    a265705_row n = map (a265705 n) [0..n]
    a265705 n k = k `bimpl` n where
       bimpl 0 0 = 0
       bimpl p q = 2 * bimpl p' q' + if u <= v then 1 else 0
                   where (p', u) = divMod p 2; (q', v) = divMod q 2
    
  • Julia
    using IntegerSequences
    for n in 0:15 println(n == 0 ? [0] : [Bits("IMP", k, n) for k in 0:n]) end  # Peter Luschny, Sep 25 2021
  • Maple
    A265705 := (n, k) -> Bits:-Implies(k, n):
    seq(seq(A265705(n, k), k=0..n), n=0..11); # Peter Luschny, Sep 23 2019
  • Mathematica
    T[n_, k_] := If[n == 0, 0, BitOr[2^Length[IntegerDigits[n, 2]]-1-k, n]];
    Table[T[n, k], {n, 0, 11}, {k, 0, n}] // Flatten (* Jean-François Alcover, Sep 25 2021, after David A. Corneth's PARI code *)
  • PARI
    T(n, k) = if(n==0,return(0)); bitor((2<David A. Corneth, Sep 24 2021
    

Formula

T(n,0) = T(n,n) = A003817(n).
T(2*n,n) = A265716(n).
Let m = A089633(n): T(m,k) = T(m,m-k), k = 0..m.
Let m = A158582(n): T(m,k) != T(m,m-k) for at least one k <= n.
Let m = A247648(n): T(2*m,m) = 2*m.
For n > 0: A029578(n+2) = number of odd terms in row n; no even terms in odd-indexed rows.
A265885(n) = T(prime(n),n).
A053644(n) = smallest k such that row k contains n.

A359676 Least positive integer whose weakly increasing prime indices have zero-based weighted sum n (A359674).

Original entry on oeis.org

1, 4, 6, 8, 14, 12, 16, 20, 30, 24, 32, 36, 40, 52, 48, 56, 100, 72, 80, 92, 96, 104, 112, 124, 136, 148, 176, 152, 214, 172, 184, 188, 262, 212, 272, 236, 248, 244, 304, 268, 346, 284, 328, 292, 386, 316, 398, 332, 376, 356, 458, 388, 478, 404, 472, 412, 526
Offset: 1

Views

Author

Gus Wiseman, Jan 14 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 zero-based weighted sum of a sequence (y_1,...,y_k) is Sum_{i=1..k} (i-1)*y_i.

Examples

			The terms together with their prime indices begin:
    1: {}
    4: {1,1}
    6: {1,2}
    8: {1,1,1}
   14: {1,4}
   12: {1,1,2}
   16: {1,1,1,1}
   20: {1,1,3}
   30: {1,2,3}
   24: {1,1,1,2}
   32: {1,1,1,1,1}
   36: {1,1,2,2}
   40: {1,1,1,3}
   52: {1,1,6}
   48: {1,1,1,1,2}
		

Crossrefs

First position of n in A359674, reverse A359677.
The sorted version is A359675, reverse A359680.
The reverse one-based version is A359679, sorted A359754.
The reverse version is A359681.
The one-based version is A359682, sorted A359755.
The version for standard compositions is A359756, one-based A089633.
A053632 counts compositions by zero-based weighted sum.
A112798 lists prime indices, length A001222, sum A056239.
A124757 gives zero-based weighted sum of standard compositions, rev A231204.
A304818 gives weighted sums of prime indices, reverse A318283.
A320387 counts multisets by weighted sum, zero-based A359678.
A358136 lists partial sums of prime indices, ranked by A358137, rev A359361.

Programs

  • Mathematica
    nn=20;
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    wts[y_]:=Sum[(i-1)*y[[i]],{i,Length[y]}];
    seq=Table[wts[primeMS[n]],{n,1,Prime[nn]^2}];
    Table[Position[seq,k][[1,1]],{k,0,nn}]

A359681 Least positive integer whose reversed (weakly decreasing) prime indices have zero-based weighted sum (A359677) equal to n.

Original entry on oeis.org

1, 4, 9, 8, 18, 50, 16, 36, 100, 54, 32, 72, 81, 108, 300, 64, 144, 400, 216, 600, 243, 128, 288, 800, 432, 486, 1350, 648, 256, 576, 729, 864, 2400, 3375, 1296, 3600, 512, 1152, 1944, 1728, 4800, 9000, 2187, 2916, 8100, 1024, 2304, 6400, 3456, 4374, 12150
Offset: 0

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 zero-based weighted sum of a sequence (y_1,...,y_k) is Sum_{i=1..k} (i-1)*y_i.

Examples

			The terms together with their prime indices begin:
    1: {}
    4: {1,1}
    9: {2,2}
    8: {1,1,1}
   18: {1,2,2}
   50: {1,3,3}
   16: {1,1,1,1}
   36: {1,1,2,2}
  100: {1,1,3,3}
   54: {1,2,2,2}
   32: {1,1,1,1,1}
   72: {1,1,1,2,2}
   81: {2,2,2,2}
  108: {1,1,2,2,2}
  300: {1,1,2,3,3}
		

Crossrefs

The unreversed version is A359676.
First position of n in A359677, reverse A359674.
The one-based version is A359679, sorted A359754.
The sorted version is A359680, reverse A359675.
The unreversed one-based version is A359682, sorted A359755.
A053632 counts compositions by zero-based weighted sum.
A112798 lists prime indices, length A001222, sum A056239.
A124757 gives zero-based weighted sum of standard compositions, rev A231204.
A304818 gives weighted sum of prime indices, reverse A318283.
A320387 counts multisets by weighted sum, zero-based A359678.

Programs

  • Mathematica
    nn=20;
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    wts[y_]:=Sum[(i-1)*y[[i]],{i,Length[y]}];
    seq=Table[wts[Reverse[primeMS[n]]],{n,1,Prime[nn]^2}];
    Table[Position[seq,k][[1,1]],{k,0,nn}]

A359682 Least positive integer whose weakly increasing prime indices have weighted sum (A304818) equal to n.

Original entry on oeis.org

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

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 5 numbers with weighted sum of prime indices 12, together with their prime indices:
  20: {1,1,3}
  27: {2,2,2}
  33: {2,5}
  37: {12}
  49: {4,4}
Hence a(12) = 20.
		

Crossrefs

The version for standard compositions is A089633, zero-based A359756.
First position of n in A304818, reverse A318283.
The greatest instead of least is A359497, reverse A359683.
The sorted zero-based version is A359675, reverse A359680.
The zero-based version is A359676, reverse A359681.
The reverse version is A359679.
The sorted version is A359755, reverse A359754.
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=20;
    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,Prime[nn]^2}];
    Table[Position[seq,k][[1,1]],{k,0,nn}]
Showing 1-10 of 35 results. Next