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 51-60 of 73 results. Next

A385005 The sum of the cubefull divisors of n.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 9, 1, 1, 1, 1, 1, 1, 1, 25, 1, 1, 1, 1, 1, 1, 1, 9, 1, 1, 28, 1, 1, 1, 1, 57, 1, 1, 1, 1, 1, 1, 1, 9, 1, 1, 1, 1, 1, 1, 1, 25, 1, 1, 1, 1, 1, 28, 1, 9, 1, 1, 1, 1, 1, 1, 1, 121, 1, 1, 1, 1, 1, 1, 1, 9, 1, 1, 1, 1, 1, 1, 1, 25, 109, 1, 1, 1
Offset: 1

Views

Author

Amiram Eldar, Jun 15 2025

Keywords

Comments

The sum of the terms in A036966 that divide n.
The number of these divisors is A190867(n), and the largest of them is A360540(n).

Crossrefs

The sum of divisors d of n such that d is: A000593 (odd), A033634 (exponentially odd), A035316 (square), A038712 (power of 2), A048250 (squarefree), A072079 (3-smooth), A073185 (cubefree), A113061 (cube), A162296 (nonsquarefree), A183097 (powerful), A186099 (5-rough), A353900 (exponentially 2^n), this sequence (cubefull), A385006 (biquadratefree).

Programs

  • Mathematica
    f[p_, e_] := (p^(e+1)-1)/(p-1) - p - If[e == 1, 0, p^2]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100]
  • PARI
    a(n) = {my(f = factor(n), p, e); prod(i = 1, #f~, p = f[i,1]; e = f[i,2]; (p^(e+1)-1)/(p-1) - p - if(e == 1, 0, p^2));}

Formula

Multiplicative with a(p^e) = 1 if e <= 2, and a(p^e) = ((p^(e+1)-1) / (p-1)) - p - p^2 if e >= 3.
Dirichlet g.f.: zeta(s-1) * zeta(s) * Product_{p prime} (1 - p^(s-1) + 1/p^(3*s-3)).

A038713 a(n) = n XOR (n-1), i.e., nim-sum of sequential pairs, written in binary.

Original entry on oeis.org

1, 11, 1, 111, 1, 11, 1, 1111, 1, 11, 1, 111, 1, 11, 1, 11111, 1, 11, 1, 111, 1, 11, 1, 1111, 1, 11, 1, 111, 1, 11, 1, 111111, 1, 11, 1, 111, 1, 11, 1, 1111, 1, 11, 1, 111, 1, 11, 1, 11111, 1, 11, 1, 111, 1, 11, 1, 1111, 1, 11, 1, 111, 1, 11, 1, 1111111, 1, 11, 1, 111, 1
Offset: 1

Views

Author

Henry Bottomley, May 02 2000

Keywords

Examples

			a(6) = 11 because 110 XOR 101 = 11 base 2.
		

Crossrefs

Cf. A038712 translated to binary, A001511 translated to unary (repeated 1's).

Programs

  • Magma
    [(10^(Valuation(n, 2)+1)-1)/9: n in [1..70]]; // Vincenzo Librandi, Mar 11 2013
  • Mathematica
    Table[(10^IntegerExponent[2*n, 2] - 1)/9, {n, 100}] (* Vincenzo Librandi, Mar 11 2013 *)
  • PARI
    a(n)=if(n<1,0, (10^(valuation(n,2)+1)-1)/9) /* Michael Somos, Apr 28 2005 */
    

Formula

a(n) = (10^A001511(n) - 1)/(10 - 1).
Multiplicative with a(2^e) = (10^(e+1) - 1)/9, a(p^e) = 1 if p odd.
G.f.: Sum_{k>=0} 10^k * x^(2^k) / (1 - x^(2^k)). - Ilya Gutkovskiy, Dec 15 2020
Dirichlet g.f.: zeta(s) * 2^s/(2^s - 10). - Amiram Eldar, Sep 21 2023

A091519 G.f.: Sum_{k>=0} (2^k*t*(1+t)/(1-t)^3, t=x^2^k).

Original entry on oeis.org

1, 6, 9, 28, 25, 54, 49, 120, 81, 150, 121, 252, 169, 294, 225, 496, 289, 486, 361, 700, 441, 726, 529, 1080, 625, 1014, 729, 1372, 841, 1350, 961, 2016, 1089, 1734, 1225, 2268, 1369, 2166, 1521, 3000, 1681, 2646, 1849, 3388, 2025, 3174, 2209, 4464, 2401, 3750
Offset: 1

Views

Author

Ralf Stephan, Jan 18 2004

Keywords

Crossrefs

Programs

  • Maple
    nmax:=47: for p from 0 to ceil(simplify(log[2](nmax))) do for n from 1 to ceil(nmax/(p+2)) do a((2*n-1)*2^p) := 2^p*(2^(p+1) - 1)*(2*n-1)^2 od: od: seq(a(n), n=1..nmax); # Johannes W. Meijer, Jan 28 2013
  • Mathematica
    a[n_] := n^2*(2 - 1/2^IntegerExponent[n, 2]); Array[a, 50] (* Amiram Eldar, Nov 29 2022 *)
  • PARI
    a(n)=2*n*n-n*n/2^valuation(n,2)
    
  • PARI
    a(n)=if(n<1,0,if(n%2==0,2*a(n/2)+n^2,n^2))

Formula

a(n) = 2*n^2 - n*A000265(n) = n*A000265(n)*A038712(n).
Recurrence: a(0) = 0, a(2*n) = 2*a(n) + (2*n)^2, a(2*n+1) = (2*n+1)^2.
a((2*n-1)*2^p) = 2^p*(2^(p+1) - 1)*(2*n-1)^2, p >= 0. - Johannes W. Meijer, Jan 28 2013
Sum_{k=1..n} a(k) ~ (4/9) * n^3. - Amiram Eldar, Nov 29 2022
From Amiram Eldar, Jan 05 2023: (Start)
Multiplicative with a(2^e) = 2^e*(2^(e+1)-1), and a(p^e) = p^(2*e) for p >= 3.
Dirichlet g.f.: zeta(s-2)*2^s/(2^s-2).
Sum_{n>=1} 1/a(n) = (c-1)*Pi^2/4, where c = A065442 is Erdős-Borwein constant. (End)

A323921 a(n) = (4^(valuation(n, 4) + 1) - 1) / 3.

Original entry on oeis.org

1, 1, 1, 5, 1, 1, 1, 5, 1, 1, 1, 5, 1, 1, 1, 21, 1, 1, 1, 5, 1, 1, 1, 5, 1, 1, 1, 5, 1, 1, 1, 21, 1, 1, 1, 5, 1, 1, 1, 5, 1, 1, 1, 5, 1, 1, 1, 21, 1, 1, 1, 5, 1, 1, 1, 5, 1, 1, 1, 5, 1, 1, 1, 85, 1, 1, 1, 5, 1, 1, 1, 5, 1, 1, 1, 5, 1, 1, 1, 21, 1, 1, 1, 5, 1, 1, 1, 5, 1, 1, 1, 5, 1, 1, 1, 21, 1, 1, 1, 5
Offset: 1

Views

Author

Ilya Gutkovskiy, Dec 15 2020

Keywords

Comments

Sum of powers of 4 dividing n.

Crossrefs

Programs

  • Mathematica
    Table[(4^(IntegerExponent[n, 4] + 1) - 1)/3, {n, 1, 100}]
    nmax = 100; CoefficientList[Series[Sum[4^k x^(4^k)/(1 - x^(4^k)), {k, 0, Floor[Log[4, nmax]] + 1}], {x, 0, nmax}], x] // Rest
  • PARI
    a(n) = (4^(valuation(n, 4) + 1) - 1) / 3; \\ Michel Marcus, Jul 09 2022
  • Python
    def A323921(n): return ((1<<((~n&n-1).bit_length()&-2)+2)-1)//3 # Chai Wah Wu, Jul 09 2022
    

Formula

G.f.: Sum_{k>=0} 4^k * x^(4^k) / (1 - x^(4^k)).
L.g.f.: -log(Product_{k>=0} (1 - x^(4^k))).
Dirichlet g.f.: zeta(s) / (1 - 4^(1 - s)).
From Amiram Eldar, Nov 27 2022: (Start)
Multiplicative with a(2^e) = (4^floor((e+2)/2)-1)/3, and a(p^e) = 1 for p != 2.
Sum_{k=1..n} a(k) ~ n*log_4(n) + (1/2 + (gamma - 1)/log(4))*n, where gamma is Euler's constant (A001620). (End)

A334045 Bitwise NOR of binary representation of n and n-1.

Original entry on oeis.org

0, 0, 0, 0, 2, 0, 0, 0, 6, 4, 4, 0, 2, 0, 0, 0, 14, 12, 12, 8, 10, 8, 8, 0, 6, 4, 4, 0, 2, 0, 0, 0, 30, 28, 28, 24, 26, 24, 24, 16, 22, 20, 20, 16, 18, 16, 16, 0, 14, 12, 12, 8, 10, 8, 8, 0, 6, 4, 4, 0, 2, 0, 0, 0, 62, 60, 60, 56, 58, 56, 56, 48, 54, 52, 52
Offset: 1

Views

Author

Christoph Schreier, Apr 13 2020

Keywords

Comments

All terms are even.
a(1) = 0, a(2) = 0, and a(2^n + 1) = 2^n - 2 for n > 0. Are there any other cases where n - a(n) < 4? - Charles R Greathouse IV, Apr 13 2020
The answer to the above question is no. Write n as n = (2m+1)*k, i.e. k = A006519(n) is the highest power of 2 dividing n. If m = 0, a(n) = 0 and n - a(n) = n. If m > 0, then a(n) = 2v*k, where v is the 1's complement of m. Thus n-a(n) = (2(m-v)+1)*k. Since m in binary has a leading 1, m - v >= 1 and thus n - a(n) >= 3 with n - a(n) = 3 when n > 2, k = 1 and m - v = 1, i.e. m is a power of 2 and n is of the form 2^r + 1. - Chai Wah Wu, Apr 13 2020

Examples

			a(11) = 11 NOR 10 = bin 1011 NOR 1010 = bin 100 = 4.
		

Crossrefs

Cf. A038712 (n XOR n-1), A086799 (n OR n-1), A129760 (n AND n-1).

Programs

  • Maple
    a:= n-> Bits[Nor](n, n-1):
    seq(a(n), n=1..100);  # Alois P. Heinz, Apr 13 2020
  • PARI
    a(n) = my(x=bitor(n-1, n)); bitneg(x, #binary(x)); \\ Michel Marcus, Apr 13 2020
  • Python
    def norbitwise(n):
        a = str(bin(n))[2:]
        b = str(bin(n-1))[2:]
        if len(b) < len(a):
            b = '0' + b
        c = ''
        for i in range(len(a)):
            if a[i] == b[i] and a[i] == '0':
                c += '1'
            else:
                c += '0'
        return int(c,2)
    
  • Python
    def A334045(n):
        m = n|(n-1)
        return 2**(len(bin(m))-2)-1-m # Chai Wah Wu, Apr 13 2020
    

A339747 a(n) = (5^(valuation(n, 5) + 1) - 1) / 4.

Original entry on oeis.org

1, 1, 1, 1, 6, 1, 1, 1, 1, 6, 1, 1, 1, 1, 6, 1, 1, 1, 1, 6, 1, 1, 1, 1, 31, 1, 1, 1, 1, 6, 1, 1, 1, 1, 6, 1, 1, 1, 1, 6, 1, 1, 1, 1, 6, 1, 1, 1, 1, 31, 1, 1, 1, 1, 6, 1, 1, 1, 1, 6, 1, 1, 1, 1, 6, 1, 1, 1, 1, 6, 1, 1, 1, 1, 31, 1, 1, 1, 1, 6, 1, 1, 1, 1, 6, 1, 1, 1, 1, 6, 1, 1, 1, 1, 6, 1, 1, 1, 1, 31
Offset: 1

Views

Author

Ilya Gutkovskiy, Dec 15 2020

Keywords

Comments

Sum of powers of 5 dividing n.
Denominator of the quotient sigma(5*n) / sigma(n).

Crossrefs

Programs

  • Mathematica
    Table[(5^(IntegerExponent[n, 5] + 1) - 1)/4, {n, 1, 100}]
    nmax = 100; CoefficientList[Series[Sum[5^k x^(5^k)/(1 - x^(5^k)), {k, 0, Floor[Log[5, nmax]] + 1}], {x, 0, nmax}], x] // Rest
  • PARI
    a(n) = (5^(valuation(n, 5) + 1) - 1)/4; \\ Amiram Eldar, Nov 27 2022

Formula

G.f.: Sum_{k>=0} 5^k * x^(5^k) / (1 - x^(5^k)).
L.g.f.: -log(Product_{k>=0} (1 - x^(5^k))).
Dirichlet g.f.: zeta(s) / (1 - 5^(1 - s)).
a(n) = sigma(n)/(sigma(5*n) - 5*sigma(n)), where sigma(n) = A000203(n). - Peter Bala, Jun 10 2022
From Amiram Eldar, Nov 27 2022: (Start)
Multiplicative with a(5^e) = (5^(e+1)-1)/4, and a(p^e) = 1 for p != 5.
Sum_{k=1..n} a(k) ~ n*log_5(n) + (1/2 + (gamma - 1)/log(5))*n, where gamma is Euler's constant (A001620). (End)

A339748 a(n) = (6^(valuation(n, 6) + 1) - 1) / 5.

Original entry on oeis.org

1, 1, 1, 1, 1, 7, 1, 1, 1, 1, 1, 7, 1, 1, 1, 1, 1, 7, 1, 1, 1, 1, 1, 7, 1, 1, 1, 1, 1, 7, 1, 1, 1, 1, 1, 43, 1, 1, 1, 1, 1, 7, 1, 1, 1, 1, 1, 7, 1, 1, 1, 1, 1, 7, 1, 1, 1, 1, 1, 7, 1, 1, 1, 1, 1, 7, 1, 1, 1, 1, 1, 43, 1, 1, 1, 1, 1, 7, 1, 1, 1, 1, 1, 7, 1, 1, 1, 1, 1, 7, 1, 1, 1, 1, 1, 7, 1, 1, 1, 1
Offset: 1

Views

Author

Ilya Gutkovskiy, Dec 15 2020

Keywords

Comments

Sum of powers of 6 dividing n.

Crossrefs

Programs

  • Mathematica
    Table[(6^(IntegerExponent[n, 6] + 1) - 1)/5, {n, 1, 100}]
    nmax = 100; CoefficientList[Series[Sum[6^k x^(6^k)/(1 - x^(6^k)), {k, 0, Floor[Log[6, nmax]] + 1}], {x, 0, nmax}], x] // Rest

Formula

G.f.: Sum_{k>=0} 6^k * x^(6^k) / (1 - x^(6^k)).
L.g.f.: -log(Product_{k>=0} (1 - x^(6^k))).
Dirichlet g.f.: zeta(s) / (1 - 6^(1 - s)).

A379007 a(n) = (n^2) XOR ((n^2)-1).

Original entry on oeis.org

1, 7, 1, 31, 1, 7, 1, 127, 1, 7, 1, 31, 1, 7, 1, 511, 1, 7, 1, 31, 1, 7, 1, 127, 1, 7, 1, 31, 1, 7, 1, 2047, 1, 7, 1, 31, 1, 7, 1, 127, 1, 7, 1, 31, 1, 7, 1, 511, 1, 7, 1, 31, 1, 7, 1, 127, 1, 7, 1, 31, 1, 7, 1, 8191, 1, 7, 1, 31, 1, 7, 1, 127, 1, 7, 1, 31, 1, 7, 1, 511, 1, 7, 1, 31, 1, 7, 1, 127, 1, 7, 1, 31, 1, 7, 1, 2047
Offset: 1

Views

Author

Antti Karttunen, Dec 16 2024

Keywords

Crossrefs

Programs

  • Mathematica
    Map[BitXor[#, # - 1] &, Range[100]^2] (* Paolo Xausa, Dec 18 2024 *)
  • PARI
    A379007(n) = bitxor(n^2, ((n^2)-1));
    
  • Python
    def A379007(n): return (m:=n**2)^m-1 # Chai Wah Wu, Dec 17 2024

Formula

Multiplicative with a(p^e) = 2^(1+2*e)-1 if p = 2; 1 if p > 2.
a(n) = A038712(A000290(n)).
a(n) = A000225(A037227(n)) = (2^(1+2*A007814(n))) - 1.
Dirichlet g.f.: zeta(s) * (2^s + 2)/(2^s - 4). - Amiram Eldar, Jan 12 2025

A059249 Tersum n + (n-1); write n and n-1 in base 3 and add mod 3 with no carries.

Original entry on oeis.org

1, 0, 5, 7, 6, 2, 4, 3, 17, 19, 18, 23, 25, 24, 20, 22, 21, 8, 10, 9, 14, 16, 15, 11, 13, 12, 53, 55, 54, 59, 61, 60, 56, 58, 57, 71, 73, 72, 77, 79, 78, 74, 76, 75, 62, 64, 63, 68, 70, 69, 65, 67, 66, 26, 28, 27, 32, 34, 33, 29, 31, 30, 44, 46, 45, 50, 52, 51, 47, 49, 48, 35
Offset: 1

Views

Author

Henry Bottomley, Jan 22 2001

Keywords

Examples

			a(21)=14 since 21 and 20 are written in base 3 as 210 and 202 and so their tersum is 112 in base 3, i.e. 9+3+2=14.
		

Crossrefs

A283750 a(n) = n^2 XOR (n + 1)^2.

Original entry on oeis.org

1, 5, 13, 25, 9, 61, 21, 113, 17, 53, 29, 233, 57, 109, 37, 481, 33, 101, 45, 249, 41, 93, 1013, 81, 49, 213, 125, 457, 89, 205, 69, 1985, 65, 197, 77, 473, 73, 253, 85, 945, 209, 117, 477, 169, 121, 4013, 229, 417, 97, 165, 1005, 185, 105, 413, 181, 1937, 241, 405, 189, 905, 153, 397, 133, 8065, 129, 389, 141, 921
Offset: 0

Views

Author

Ilya Gutkovskiy, Mar 15 2017

Keywords

Comments

XOR the binary representations of n^2 and (n + 1)^2.

Crossrefs

Cf. also A379007.

Programs

Formula

a(n) = A000290(n) XOR A000290(n+1).
Previous Showing 51-60 of 73 results. Next