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-4 of 4 results.

A003970 Möbius transform of A003960 (with alternating zeros omitted).

Original entry on oeis.org

1, 1, 2, 3, 2, 5, 6, 2, 8, 9, 3, 11, 6, 4, 14, 15, 5, 6, 18, 6, 20, 21, 4, 23, 12, 8, 26, 10, 9, 29, 30, 6, 12, 33, 11, 35, 36, 6, 15, 39, 8, 41, 16, 14, 44, 18, 15, 18, 48, 10, 50, 51, 6, 53, 54, 18, 56, 22, 12, 24, 30, 20, 18, 63, 21, 65, 27, 8, 68, 69, 23, 30, 28, 12, 74, 75
Offset: 1

Views

Author

Keywords

Examples

			The Möbius transform begins 1,0,1,0,2,0,3,0,2,0,5,0,6,0,2,0,8,0,9,0,3,0,11,0,...
		

Crossrefs

Cf. A003960.

Programs

  • Mathematica
    f[p_, e_] := ((p - 1)/2) ((p + 1)/2)^(e - 1); a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[2*n - 1]; Array[a, 100] (* Amiram Eldar, Nov 03 2023 *)
  • PARI
    a(n) = {my(f = factor(2*n-1)); for (i=1, #f~, p = f[i, 1]; f[i, 1] = (p-1)/2*((p+1)/2)^(f[i,2]-1); f[i, 2] = 1); factorback(f);} \\ Michel Marcus, Feb 27 2015

Formula

Multiplicative with a(p^e) = [(p-1)/2][(p+1)/2]^(e-1). - David W. Wilson, Sep 01 2001

Extensions

More terms from Reiner Martin, Aug 15 2001
Further terms from David W. Wilson, Aug 29 2001

A003971 Inverse Möbius transform of A003960.

Original entry on oeis.org

1, 2, 3, 3, 4, 6, 5, 4, 7, 8, 7, 9, 8, 10, 12, 5, 10, 14, 11, 12, 15, 14, 13, 12, 13, 16, 15, 15, 16, 24, 17, 6, 21, 20, 20, 21, 20, 22, 24, 16, 22, 30, 23, 21, 28, 26, 25, 15, 21, 26, 30, 24, 28, 30, 28, 20, 33, 32, 31, 36, 32, 34, 35, 7, 32, 42, 35, 30, 39, 40, 37, 28, 38, 40
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A003960.

Programs

  • Mathematica
    f[p_, e_] := (((p + 1)/2)^(e + 1) - 1)/((p - 1)/2); f[2, e_] := e + 1; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Dec 06 2022 *)

Formula

Multiplicative with a(p^e) = e+1 if p = 2; (((p+1)/2)^(e+1) - 1)/((p-1)/2) if p > 2. - David W. Wilson, Sep 01 2001

Extensions

More terms from Reiner Martin, Aug 15 2001
Formula corrected by Sean A. Irvine, Sep 26 2015

A290323 Minimal number of supporters among total of n voters that may make (but not guarantee) their candidate win in a multi-level selection based on the majority vote at each level.

Original entry on oeis.org

1, 2, 2, 3, 3, 4, 4, 5, 4, 6, 6, 6, 7, 8, 6, 9, 9, 8, 10, 9, 8, 12, 12, 10, 9, 14, 8, 12, 15, 12, 16, 15, 12, 18, 12, 12, 19, 20, 14, 15, 21, 16, 22, 18, 12, 24, 24, 18, 16, 18, 18, 21, 27, 16, 18, 20, 20, 30, 30, 18, 31, 32, 16, 25, 21, 24, 34, 27
Offset: 1

Views

Author

Max Alekseyev, Jul 27 2017

Keywords

Comments

Each group in a given level must have the same number of voters. A tie in the voting results in a win for the opposition. (A003960 appears to describe the case in which a tie results in a loss for the opposition.) - Peter Kagey, Aug 16 2017
This is related to the gerrymandering question. - N. J. A. Sloane, Feb 27 2021

Examples

			For n=9, four supporters are enough in the following 2-level selection with (s)upporters and (o)pponents: ((sso),(sso),(ooo)). On the other hand, no smaller number of supporters can lead to a win in any multi-level selection. Hence, a(9)=4.
		

Crossrefs

Programs

  • Mathematica
    f[p_, e_] := ((p + 1)/2)^e; f[2, e_] := Switch[Mod[e, 3], 1, 9/5, 2, 3, 0, 1] * 5^Floor[e/3]; f[2, 1] = 2; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Sep 18 2023 *)
  • PARI
    A290323(n) = my(m=valuation(n,2),f=factor(n>>m)); if(m==1, 2, [1,9/5,3][m%3+1]*5^(m\3)) * prod(i=1,#f~, ((f[i,1]+1)/2)^f[i,2]);
    
  • Python
    from sympy import factorint
    from functools import reduce
    from operator import mul
    def A290323(n):
        f = factorint(n)
        m = f[2] if 2 in f else 0
        a, b = divmod(m,3)
        c = 2 if m == 1 else 3**(b*(b+1)%5)*5**(a-(b%2))
        return c*reduce(mul,(((d+1)//2)**f[d] for d in f if d != 2),1) # Chai Wah Wu, Mar 05 2021
  • Ruby
    def divisors_of(n); (2..n).select { |d| n % d == 0 } end
    def f(n, group_size); (group_size/2 + 1) * a(n / group_size) end
    def a(n); n == 1 ? 1 : divisors_of(n).map { |d| f(n, d) }.min end
    # Peter Kagey, Aug 16 2017
    

Formula

Let n = 2^m*p1*...*pk, where pi are odd primes. Then a(n) = c*(p1+1)/2*...*(pk+1)/2 = c*A003960(n), where c=2 if m=1; c=5^b if m=3b; c=3*5^b if m=3b+2; c=9*5^b, if m=3b+4 (b>=0). [So c(m) = A005517(m+1). - Andrey Zabolotskiy, Jan 27 2022]

Extensions

Keyword:mult added by Andrew Howroyd, Aug 06 2018

A133205 Fully multiplicative with a(p) = p*(p+1)/2 for prime p.

Original entry on oeis.org

1, 3, 6, 9, 15, 18, 28, 27, 36, 45, 66, 54, 91, 84, 90, 81, 153, 108, 190, 135, 168, 198, 276, 162, 225, 273, 216, 252, 435, 270, 496, 243, 396, 459, 420, 324, 703, 570, 546, 405, 861, 504, 946, 594, 540, 828, 1128, 486, 784, 675, 918, 819, 1431, 648, 990, 756
Offset: 1

Views

Author

Jonathan Vos Post, Oct 10 2007

Keywords

Comments

There are analogs with the triangular numbers replaced by some other sequence, but this was chosen because of the parity coincidences of A034953.

Crossrefs

Programs

  • Mathematica
    f[p_, e_] := (p*(p + 1)/2)^e; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 60] (* Amiram Eldar, Dec 24 2022 *)
  • PARI
    a(n)=my(f=factor(n));prod(i=1,#f[,1],binomial(f[i,1]+1,2)^f[i,2]) /* Charles R Greathouse IV, Sep 09 2010 */
    
  • PARI
    for(n=1, 100, print1(direuler(p=2, n, 1 + (p^2 + p) / (2/X - p^2 - p))[n], ", ")) \\ Vaclav Kotesovec, Apr 05 2023

Formula

a((p_1)^(e_1)*(p_2)^(e_2)*...*(p_k)^(e_k)) = T(p_1)^(e_1)*T(p_2)^(e_2)*...*T(p_k)^(e_k), where T(i) = A000217(i). a(prime(i)) = A034953(i).
Sum_{n>=1} 1/a(n) = Product_{p prime} (1 - 2/(p*(p+1)))^(-1) = 2.12007865309570462566... . - Amiram Eldar, Dec 24 2022
Dirichlet g.f.: Product_{p prime} (1 + (p^2 + p) / (2*p^s - p^2 - p)). - Vaclav Kotesovec, Apr 05 2023
a(n) = A167338(n)/A061142(n). - Vaclav Kotesovec, Jan 28 2025
Conjecture: Sum_{k=1..n} a(k) = O(n^3/log(n)). - Vaclav Kotesovec, Jan 28 2025
Showing 1-4 of 4 results.