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 41-50 of 73 results. Next

A324056 a(n) = A000593(A005940(1+n)).

Original entry on oeis.org

1, 1, 4, 1, 6, 4, 13, 1, 8, 6, 24, 4, 31, 13, 40, 1, 12, 8, 32, 6, 48, 24, 78, 4, 57, 31, 124, 13, 156, 40, 121, 1, 14, 12, 48, 8, 72, 32, 104, 6, 96, 48, 192, 24, 248, 78, 240, 4, 133, 57, 228, 31, 342, 124, 403, 13, 400, 156, 624, 40, 781, 121, 364, 1, 18, 14, 56, 12, 84, 48, 156, 8, 112, 72, 288, 32, 372, 104, 320, 6, 168, 96, 384, 48
Offset: 0

Views

Author

Antti Karttunen, Feb 14 2019

Keywords

Crossrefs

Programs

Formula

a(n) = A000593(A005940(1+n)).
a(n) = A324054(n) / A038712(1+n).

A326988 Sum of nonpowers of 2 dividing n.

Original entry on oeis.org

0, 0, 3, 0, 5, 9, 7, 0, 12, 15, 11, 21, 13, 21, 23, 0, 17, 36, 19, 35, 31, 33, 23, 45, 30, 39, 39, 49, 29, 69, 31, 0, 47, 51, 47, 84, 37, 57, 55, 75, 41, 93, 43, 77, 77, 69, 47, 93, 56, 90, 71, 91, 53, 117, 71, 105, 79, 87, 59, 161, 61, 93, 103, 0, 83, 141, 67, 119, 95, 141, 71, 180, 73, 111, 123, 133, 95, 165, 79, 155
Offset: 1

Views

Author

Omar E. Pol, Aug 18 2019

Keywords

Comments

In other words: a(n) is the sum of the divisors of n that are not powers of 2.
a(n) is also the sum of odd divisors greater than 1 of n, multiplied by the sum of the divisors of n that are powers of 2.
a(n) = 0 if and only if n is a power of 2.
a(n) = n if and only if n is an odd prime.
From Bernard Schott, Sep 17 2019: (Start)
a(n) = 3*n/2 if and only if n is an even semiprime greater than or equal to 6 (A100484).
a(n) = n + sqrt(n) if and only if n is the square of an odd prime (see A001248 without its first term). (End)

Examples

			For n = 18 the divisors of 18 are [1, 2, 3, 6, 9, 18]. There are four divisors of 18 that are not powers of 2, they are [3, 6, 9, 18]. The sum of them is 3 + 6 + 9 + 18 = 36, so a(18) = 36.
On the other hand, the sum of odd divisors greater than 1 of 18 is 3 + 9 = 12, and the sum of the divisors of 18 that are powers of 2 is 1 + 2 = 3, then we have that 12 * 3 = 36, so a(18) = 36.
		

Crossrefs

Row sums of A326989.

Programs

  • Magma
    sol:=[];  m:=1;  for n in [1..80] do v:=Set(Divisors(n)) diff {2^k:k in [0..Floor(Log(2,n))]};  sol[m]:=&+v; m:=m+1; end for; sol; // Marius A. Burtea, Aug 24 2019
    
  • Maple
    f:= n -> numtheory:-sigma(n) - 2^(1+padic:-ordp(n,2))+1:
    map(f, [$1..100]); # Robert Israel, Apr 29 2020
  • Mathematica
    Table[DivisorSigma[1, n] - Denominator[DivisorSigma[1, 2n]/DivisorSigma[1, n]], {n, 100}] (* Wesley Ivan Hurt, Aug 24 2019 *)
  • PARI
    ispp2(n) = (n==1) || (isprimepower(n, &p) && (p==2));
    a(n) = sumdiv(n, d, if (!ispp2(d), d)); \\ Michel Marcus, Aug 26 2019
    
  • Python
    from sympy import divisor_sigma
    def A326988(n): return divisor_sigma(n)-(n^(n-1)) # Chai Wah Wu, Aug 04 2022
  • Scala
    def divisors(n: Int): IndexedSeq[Int] = (1 to n).filter(n % _ == 0)
    (1 to 80).map(divisors().filter(n => n != Integer.highestOneBit(n)).sum) // _Alonso del Arte, Apr 29 2020
    

Formula

a(n) = A000203(n) - A038712(n).
a(n) = (A000593(n) - 1)*A038712(n).
a(n) = A326990(n)*A038712(n).
a(n) = Sum_{d|n, d > 1} d * (1 - [rad(d) = 2]), where rad is the squarefree kernel (A007947) and [] is the Iverson bracket, which gives 1 if the condition is true, 0 if it's false. - Wesley Ivan Hurt, Apr 29 2020

A355584 a(n) is the sum of the 5-smooth divisors of n.

Original entry on oeis.org

1, 3, 4, 7, 6, 12, 1, 15, 13, 18, 1, 28, 1, 3, 24, 31, 1, 39, 1, 42, 4, 3, 1, 60, 31, 3, 40, 7, 1, 72, 1, 63, 4, 3, 6, 91, 1, 3, 4, 90, 1, 12, 1, 7, 78, 3, 1, 124, 1, 93, 4, 7, 1, 120, 6, 15, 4, 3, 1, 168, 1, 3, 13, 127, 6, 12, 1, 7, 4, 18, 1, 195, 1, 3, 124, 7
Offset: 1

Views

Author

Amiram Eldar, Jul 08 2022

Keywords

Crossrefs

Sum of the p-smooth divisors of n: A038712 (2), A072079 (3), this sequence (5).

Programs

  • Mathematica
    a[n_] := (Times @@ ({2, 3, 5}^(IntegerExponent[n, {2, 3, 5}] + 1) - 1))/8; Array[a, 100]
  • PARI
    a(n) = (2^(valuation(n, 2) + 1) - 1) * (3^(valuation(n, 3) + 1) - 1) * (5^(valuation(n, 5) + 1) - 1) / 8;
    
  • Python
    from sympy import multiplicity as v
    def a(n): return (2**(v(2, n)+1)-1) * (3**(v(3, n)+1)-1) * (5**(v(5, n)+1)-1) // 8
    print([a(n) for n in range(1, 77)]) # Michael S. Branicky, Jul 08 2022

Formula

Multiplicative with a(p^e) = (p^(e+1)-1)/(p-1) if p <= 5, and 1 otherwise.
a(n) = (2^(A007814(n)+1)-1)*(3^(A007949(n)+1)-1)*(5^(A112765(n)+1)-1)/8.
a(n) = A000203(A355582(n)).
a(n) <= A000203(n), with equality if and only if n is in A051037.
Dirichlet g.f.: zeta(s)*(2^s/(2^s-2))*(3^s/(3^s-3))*(5^s/(5^s-5)). - Amiram Eldar, Dec 25 2022

A088841 Numerator of the quotient sigma(7*n)/sigma(n).

Original entry on oeis.org

8, 8, 8, 8, 8, 8, 57, 8, 8, 8, 8, 8, 8, 57, 8, 8, 8, 8, 8, 8, 57, 8, 8, 8, 8, 8, 8, 57, 8, 8, 8, 8, 8, 8, 57, 8, 8, 8, 8, 8, 8, 57, 8, 8, 8, 8, 8, 8, 400, 8, 8, 8, 8, 8, 8, 57, 8, 8, 8, 8, 8, 8, 57, 8, 8, 8, 8, 8, 8, 57, 8, 8, 8, 8, 8, 8, 57, 8, 8, 8, 8, 8, 8, 57, 8, 8, 8, 8, 8, 8, 57, 8, 8, 8, 8, 8, 8
Offset: 1

Views

Author

Labos Elemer, Nov 04 2003

Keywords

Crossrefs

Programs

  • Mathematica
    Table[Numerator[DivisorSigma[1, 7*n]/DivisorSigma[1, n]], {n, 1, 128}]
  • PARI
    a(n) = numerator(sigma(7*n)/sigma(n)); \\ Amiram Eldar, Mar 22 2024

Formula

From Amiram Eldar, Mar 22 2024: (Start)
a(n) = numerator(A283078(n)/A000203(n)).
a(n) = (7^(A214411(n)+2)-1)/6 = (49*A268354(n)-1)/6.
Sum_{k=1..n} a(k) ~ (7/log(7))*n*log(n) + (9/2 + 7*(gamma-1)/log(7))*n, where gamma is Euler's constant (A001620).
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k)/A088842(k) = 1 + 36 * Sum_{k>=1} 1/(7^k-1) = 7.87276224676... . (End)

A089312 Write n in binary; a(n) = number represented by rightmost block of 1's.

Original entry on oeis.org

0, 1, 1, 3, 1, 1, 3, 7, 1, 1, 1, 3, 3, 1, 7, 15, 1, 1, 1, 3, 1, 1, 3, 7, 3, 1, 1, 3, 7, 1, 15, 31, 1, 1, 1, 3, 1, 1, 3, 7, 1, 1, 1, 3, 3, 1, 7, 15, 3, 1, 1, 3, 1, 1, 3, 7, 7, 1, 1, 3, 15, 1, 31, 63, 1, 1, 1, 3, 1, 1, 3, 7, 1, 1, 1, 3, 3, 1, 7, 15, 1, 1, 1, 3, 1, 1, 3, 7, 3, 1, 1, 3, 7, 1, 15, 31, 3, 1, 1, 3, 1
Offset: 0

Views

Author

N. J. A. Sloane, Dec 22 2003

Keywords

Examples

			13 = 1101 so a(13) = 1.
		

Crossrefs

a(2n+1) = A038712(n+1).

Programs

  • Mathematica
    rb1[n_]:=Module[{id=Split[IntegerDigits[n,2]]},If[MemberQ[ Last[ id],0], FromDigits[ id[[-2]],2], FromDigits[id[[-1]],2]]]; Join[{0}, Array[ rb1,100]] (* Harvey P. Dale, Dec 18 2015 *)

Extensions

More terms from Vladeta Jovovic, Jan 20 2004

A100892 a(n) = (2*n-1) XOR (2*n+1), bitwise.

Original entry on oeis.org

2, 6, 2, 14, 2, 6, 2, 30, 2, 6, 2, 14, 2, 6, 2, 62, 2, 6, 2, 14, 2, 6, 2, 30, 2, 6, 2, 14, 2, 6, 2, 126, 2, 6, 2, 14, 2, 6, 2, 30, 2, 6, 2, 14, 2, 6, 2, 62, 2, 6, 2, 14, 2, 6, 2, 30, 2, 6, 2, 14, 2, 6, 2, 254, 2, 6, 2, 14, 2, 6, 2, 30, 2, 6, 2, 14, 2, 6, 2, 62, 2, 6, 2, 14, 2, 6, 2, 30, 2, 6, 2, 14, 2
Offset: 1

Views

Author

Reinhard Zumkeller, Jan 10 2005

Keywords

Crossrefs

Programs

  • Haskell
    a100892 n = (2 * n - 1) `xor` (2 * n + 1)
    a100892_list = zipWith xor (tail a005408_list) a005408_list
    -- Reinhard Zumkeller, Sep 03 2013
    
  • Mathematica
    a[n_]:=BitXor[2*n-1,2*n+1]; a/@Range[100] (* Ivan N. Ianakiev, Jul 04 2019 *)
  • PARI
    a(n)=4*2^valuation(n,2)-2; \\ Ralf Stephan, Aug 21 2013
    
  • Python
    def A100892(n): return ((~n& n-1)<<2)+2 # Chai Wah Wu, Jul 07 2022

Formula

a(n) = 2 * ((n-1) XOR n) = 2*A038712(n).
a(n) = 4*2^A007814(n) - 2.
Recurrence: a(2n) = 2a(n) + 2, a(2n+1) = 2. - Ralf Stephan, Aug 21 2013
a(n) = A088837(n) - 1. - Filip Zaludek, Dec 10 2016
a(n) = A074400(n)/A000593(n) = 2*A000203(n)/A000593(n). - Ivan N. Ianakiev, Jul 04 2019

A126851 SPM4Sigma(n) = (-1)^(1/2*((Sum_i p_i)-Omega(m'))*Sum_{d|n} (-1)^(1/2*((Sum_j p_j)-Omega(d'))*d =(2^(r+1)-1)*Product_i [Sum_{1<=s_i<=r_i} p_i^s_i +(-1)^((p_i-1)/2)] where n=2^r*m', gcd(2,m')=1, m'=Product_i p_i^r_i, d=2^k*d', gcd(2,d')=1, d'=Product_j p_j^r_j SPM4 for Signed by Prime factors Mod 4.

Original entry on oeis.org

1, 3, 2, 7, 6, 6, 6, 15, 11, 18, 10, 14, 14, 18, 12, 31, 18, 33, 18, 42, 12, 30, 22, 30, 31, 42, 38, 42, 30, 36, 30, 63, 20, 54, 36, 77, 38, 54, 28, 90, 42, 36, 42, 70, 66, 66, 46, 62, 55, 93, 36, 98, 54, 114, 60, 90, 36, 90, 58, 84, 62, 90, 66, 127, 84, 60, 66, 126, 44, 108, 70, 165, 74, 114, 62, 126, 60, 84, 78, 186
Offset: 1

Views

Author

Yasutoshi Kohmoto, Feb 24 2007

Keywords

Comments

The name contains an unmatched parenthesis. - Editors, Mar 12 2024

Examples

			SPM4Sigma(240) = (1+2+4+8+16)*(-1+3)*(1+5).
		

Crossrefs

Cf. A126852.

Programs

  • Maple
    A126851 := proc(n)
        local r,mprime,piri,iprod,pi,ri,si;
        r := A007814(n) ;
        mprime := n/2^r ;
        iprod := 1 ;
        if mprime > 1 then
            for piri in ifactors(mprime)[2] do
                pi := op(1,piri) ;
                ri := op(2,piri) ;
                add(pi^si,si=1..ri) + (-1)^( (pi-1)/2) ;;
                iprod := iprod*% ;
            end do:
        end if;
        %*A038712(n) ;
    end proc:
    seq(A126851(n),n=1..40) ; # R. J. Mathar, Mar 13 2024

Formula

SPM4Sigma(n) = (2^r-1)*Product_i (p_i^(r_i+1)-p_i)/(p_i-1)+(-1)^(1/2*(p_i-1)) = (2^r-1)*Product_{i=1 mod 4} ((p_i^(r_i+1)-p_i)/(p_i-1)+1)*Product_{i=3 mod 4} ((p_i^(r_i+1)-p_i)/(p_i-1)-1)
a(2^n) = A000225(n+1). - R. J. Mathar, Mar 13 2024
A038712(n) | a(n). - R. J. Mathar, Mar 13 2024

Extensions

a(2) and a(7) corrected, sequence extended beyond a(20). - R. J. Mathar, Mar 13 2024

A228349 Triangle read by rows: T(j,k) is the k-th part in nondecreasing order of the j-th region of the set of compositions (ordered partitions) of n in colexicographic order, if 1<=j<=2^(n-1) and 1<=k<=A006519(j).

Original entry on oeis.org

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

Views

Author

Omar E. Pol, Aug 26 2013

Keywords

Comments

Triangle read by rows in which row n lists the A006519(n) elements of the row A001511(n) of triangle A090996, n >= 1.
The equivalent sequence for partitions is A220482.

Examples

			----------------------------------------------------------
.             Diagram                Triangle
Compositions    of            of compositions (rows)
of 5          regions          and regions (columns)
----------------------------------------------------------
.            _ _ _ _ _
5           |_        |                                 5
1+4         |_|_      |                               1 4
2+3         |_  |     |                             2   3
1+1+3       |_|_|_    |                           1 1   3
3+2         |_    |   |                         3       2
1+2+2       |_|_  |   |                       1 2       2
2+1+2       |_  | |   |                     2   1       2
1+1+1+2     |_|_|_|_  |                   1 1   1       2
4+1         |_      | |                 4               1
1+3+1       |_|_    | |               1 3               1
2+2+1       |_  |   | |             2   2               1
1+1+2+1     |_|_|_  | |           1 1   2               1
3+1+1       |_    | | |         3       1               1
1+2+1+1     |_|_  | | |       1 2       1               1
2+1+1+1     |_  | | | |     2   1       1               1
1+1+1+1+1   |_|_|_|_|_|   1 1   1       1               1
.
Written as an irregular triangle in which row n lists the parts of the n-th region the sequence begins:
1;
1,2;
1;
1,1,2,3;
1;
1,2;
1;
1,1,1,1,2,2,3,4;
1;
1,2;
1;
1,1,2,3;
1;
1,2;
1;
1,1,1,1,1,1,1,1,2,2,2,2,3,3,4,5;
...
Alternative interpretation of this sequence:
Triangle read by rows in which row r lists the regions of the last section of the set of compositions of r:
[1];
[1,2];
[1],[1,1,2,3];
[1],[1,2],[1],[1,1,1,1,2,2,3,4];
[1],[1,2],[1],[1,1,2,3],[1],[1,2],[1],[1,1,1,1,1,1,1,1,2,2,2,2,3,3,4,5];
		

Crossrefs

Main triangle: Right border gives A001511. Row j has length A006519(j). Row sums give A038712.

Programs

  • Mathematica
    Table[Map[Length@ TakeWhile[IntegerDigits[#, 2], # == 1 &] &, Range[2^(# - 1), 2^# - 1]] &@ IntegerExponent[2 n, 2], {n, 32}] // Flatten (* Michael De Vlieger, May 23 2017 *)

A342639 Square array T(n, k), n, k >= 0, read by antidiagonals; T(n, k) = g(f(n) + f(k)) where g maps the complement, say s, of a finite set of nonnegative integers to the value Sum_{e >= 0 not in s} 2^e, f is the inverse of g, and "+" denotes the Minkowski sum.

Original entry on oeis.org

0, 1, 1, 0, 3, 0, 3, 1, 1, 3, 0, 7, 2, 7, 0, 1, 1, 3, 3, 1, 1, 0, 3, 0, 15, 0, 3, 0, 7, 1, 5, 3, 3, 5, 1, 7, 0, 15, 2, 7, 0, 7, 2, 15, 0, 1, 1, 7, 3, 1, 1, 3, 7, 1, 1, 0, 3, 0, 31, 4, 11, 4, 31, 0, 3, 0, 3, 1, 1, 3, 7, 5, 5, 7, 3, 1, 1, 3, 0, 7, 2, 7, 0, 15, 6, 15, 0, 7, 2, 7, 0
Offset: 0

Views

Author

Rémy Sigrist, Mar 17 2021

Keywords

Comments

In other words:
- we consider the set S of sets s of nonnegative integers whose complement is finite,
- the function g encodes the "missing integers" in binary:
g(A001477 \ {1, 4}) = 2^1 + 2^4 = 18
- the function f is the inverse of g:
f(42) = f(2^1 + 2^3 + 2^5) = A001477 \ {1, 3, 5},
- the Minkowski sum of two sets, say U and V, is the set of sums u+v where u belongs to U and v belongs to V,
- the Minkowski sum is stable over S,
- and T provides an encoding for this operation.
This sequence has connections with A067138; here we consider complements of finite sets of nonnegative integers, there finite sets of nonnegative integers.

Examples

			Array T(n, k) begins:
  n\k|   0   1   2   3   4   5   6    7   8   9  10  11  12  13  14   15
  ---+------------------------------------------------------------------
    0|   0   1   0   3   0   1   0    7   0   1   0   3   0   1   0   15
    1|   1   3   1   7   1   3   1   15   1   3   1   7   1   3   1   31
    2|   0   1   2   3   0   5   2    7   0   1   2  11   0   5   2   15
    3|   3   7   3  15   3   7   3   31   3   7   3  15   3   7   3   63
    4|   0   1   0   3   0   1   4    7   0   1   0   3   0   9   4   15
    5|   1   3   5   7   1  11   5   15   1   3   5  23   1  11   5   31
    6|   0   1   2   3   4   5   6    7   0   9   2  11   4  13   6   15
    7|   7  15   7  31   7  15   7   63   7  15   7  31   7  15   7  127
    8|   0   1   0   3   0   1   0    7   0   1   0   3   0   1   8   15
    9|   1   3   1   7   1   3   9   15   1   3   1   7   1  19   9   31
   10|   0   1   2   3   0   5   2    7   0   1  10  11   0   5  10   15
   11|   3   7  11  15   3  23  11   31   3   7  11  47   3  23  11   63
   12|   0   1   0   3   0   1   4    7   0   1   0   3   8   9  12   15
   13|   1   3   5   7   9  11  13   15   1  19   5  23   9  27  13   31
   14|   0   1   2   3   4   5   6    7   8   9  10  11  12  13  14   15
   15|  15  31  15  63  15  31  15  127  15  31  15  63  15  31  15  255
		

Crossrefs

Programs

  • PARI
    T(n,k) = { my (v=0); for (x=0, #binary(n)+#binary(k), my (f=0); for (y=0, x, if (!bittest(n,y) && !bittest(k,x-y), f=1; break)); if (!f, v+=2^x)); return (v) }

Formula

T(n, k) = T(k, n).
T(m, T(n, k)) = T(T(m, n), k).
T(n, 0) = A135481(n).
T(n, 1) = A038712(n+1).
T(2^n-1, 2^k-1) = 2^(n+k)-1.
T(n, n) = A342640(n).

A378988 a(n) = 2*n XOR 1+sigma(n), where XOR is bitwise-xor, A003987.

Original entry on oeis.org

0, 0, 3, 0, 13, 1, 7, 0, 28, 7, 27, 5, 21, 5, 7, 0, 49, 12, 51, 3, 11, 9, 55, 13, 18, 31, 31, 1, 37, 117, 31, 0, 115, 115, 119, 20, 109, 113, 119, 11, 121, 53, 123, 13, 21, 21, 111, 29, 88, 58, 47, 11, 93, 21, 39, 9, 35, 47, 75, 209, 69, 29, 23, 0, 215, 21, 195, 247, 235, 29, 199, 84, 217, 231, 235, 21, 251, 53, 207
Offset: 1

Views

Author

Antti Karttunen, Dec 16 2024

Keywords

Comments

For any hypothetical quasiperfect number q (for which sigma(q) = 2*q+1, see A336701), a(q) would be equal to 2*q XOR 2*q+2 = 2*(q XOR q+1) = 2*A038712(1+q) = A100892(1+q).
See also A000079 and A235796 concerning the "almost perfect" or "least deficient" numbers that give positions of 0's here.

Crossrefs

Cf. A000079 (conjectured to give positions of all 0's), A000396 (positions of 1's), A000203, A003987, A028982 (positions of even terms), A028983 (of odd terms), A038712, A100892, A318467, A336701, A378998, A379009 [= a(n^2)].

Programs

  • Mathematica
    Array[BitXor[2*#, DivisorSigma[1, #] + 1] &, 100] (* Paolo Xausa, Dec 16 2024 *)
  • PARI
    A378988(n) = bitxor(n+n,1+sigma(n));

Formula

For all n in A028983, a(n) = 2n+1 XOR sigma(n) = 1+A318467(n).
Previous Showing 41-50 of 73 results. Next