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

A324058 a(n) = A324121(A005940(1+n)) = gcd(A324054(n), A005940(1+n)*A106737(n)).

Original entry on oeis.org

1, 1, 2, 1, 2, 12, 1, 1, 2, 2, 12, 4, 1, 3, 4, 1, 2, 8, 4, 6, 4, 24, 6, 12, 3, 3, 2, 1, 4, 24, 1, 3, 2, 4, 12, 56, 4, 48, 2, 10, 4, 16, 24, 24, 2, 18, 120, 4, 1, 3, 6, 1, 6, 12, 1, 3, 4, 4, 24, 8, 1, 3, 2, 1, 2, 2, 4, 12, 4, 48, 6, 8, 28, 8, 24, 112, 6, 24, 8, 2, 4, 16, 24, 336, 8, 96, 12, 120, 6, 24, 4, 6, 8, 720, 6, 36, 3, 3, 2, 21, 6, 36, 3, 15, 14, 6
Offset: 0

Views

Author

Antti Karttunen, Feb 15 2019

Keywords

Crossrefs

Programs

  • PARI
    A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); t }; \\ From A005940
    A106737(n) = sum(k=0, n, (binomial(n+k, n-k)*binomial(n, k)) % 2);
    A324054(n) = { my(p=2,mp=p*p,m=1); while(n, if(!(n%2), p=nextprime(1+p); mp = p*p, if(3==(n%4),mp *= p,m *= (mp-1)/(p-1))); n>>=1); (m); };
    A324058(n) = gcd(A324054(n), A005940(1+n)*A106737(n));
    \\ Alternatively as:
    A324121(n) = gcd(sigma(n),n*numdiv(n));
    A324058(n) = A324121(A005940(1+n));

Formula

a(n) = A324121(A005940(1+n)) = gcd(A324054(n), A005940(1+n)*A106737(n)).

A324188 a(n) = A324121(A163511(n)).

Original entry on oeis.org

1, 1, 1, 2, 1, 1, 12, 2, 1, 4, 3, 1, 4, 12, 2, 2, 3, 1, 24, 4, 1, 2, 3, 3, 12, 6, 24, 4, 6, 4, 8, 2, 1, 2, 3, 1, 8, 24, 4, 4, 3, 1, 12, 6, 1, 6, 3, 1, 4, 120, 18, 2, 24, 24, 16, 4, 10, 2, 48, 4, 56, 12, 4, 2, 1, 1, 12, 6, 1, 2, 1, 1, 24, 12, 48, 40, 12, 8, 16, 4, 1, 20, 3, 3, 4, 36, 6, 14, 15, 3, 36, 6, 21, 2, 3, 3, 36, 6, 720, 8, 6, 4, 24, 6, 120, 12
Offset: 0

Views

Author

Antti Karttunen, Feb 17 2019

Keywords

Crossrefs

Programs

  • PARI
    A163511(n) = if(!n,1,my(p=2, t=1); while(n>1, if(!(n%2), (t*=p), p=nextprime(1+p)); n >>= 1); (t*p));
    A324121(n) = gcd(sigma(n),n*numdiv(n));
    A324188(n) = A324121(A163511(n));
    
  • PARI
    A324183(n) = if(!n,1,n = ((3<<#binary(n\2))-n-1); my(e=0,m=1); while(n>0, if(!(n%2), m *= (1+e); e=0, e++); n >>= 1); (m*(1+e)));
    A324184(n) = if(!n,1,my(p=2,mp=p*p,m=1); while(n>1, if(n%2, p=nextprime(1+p); mp = p*p, if((2==n)||!(n%4),mp *= p,m *= (mp-1)/(p-1))); n >>= 1); (m*(mp-1)/(p-1)));
    A324188(n) = gcd(A324184(n), A163511(n)*A324183(n));

Formula

a(n) = A324121(A163511(n)) = gcd(A324184(n), A163511(n)*A324183(n)).
For n > 0, a(n) = A324058(A054429(n)).

A336314 a(n) = A324121(A122111(n)).

Original entry on oeis.org

1, 1, 1, 2, 1, 12, 1, 2, 1, 4, 3, 2, 1, 12, 3, 2, 1, 12, 1, 6, 1, 4, 1, 8, 4, 36, 1, 10, 1, 24, 3, 2, 3, 4, 24, 4, 1, 12, 1, 56, 1, 24, 1, 2, 3, 4, 1, 4, 1, 6, 9, 6, 1, 4, 8, 8, 1, 12, 9, 48, 1, 4, 1, 2, 24, 120, 5, 2, 3, 18, 7, 12, 1, 36, 2, 10, 3, 24, 1, 12, 3, 4, 3, 112
Offset: 1

Views

Author

Antti Karttunen, Jul 19 2020

Keywords

Crossrefs

Cf. A336317 (gives the positions where this coincides with A323173).
Cf. also A335914.

Programs

  • PARI
    A122111(n) = if(1==n,n,my(f=factor(n), es=Vecrev(f[,2]),is=concat(apply(primepi,Vecrev(f[,1])),[0]),pri=0,m=1); for(i=1, #es, pri += es[i]; m *= prime(pri)^(is[i]-is[1+i])); (m));
    A324121(n) = gcd(sigma(n),n*numdiv(n));
    A336314(n) = A324121(A122111(n));
    
  • PARI
    \\ Or as a standalone program:
    A336314(n) = if(1==n,1,my(f=factor(n),es=Vecrev(f[,2]),is=concat(apply(primepi,Vecrev(f[,1])),[0]),pri=0,d=1,s=1,x=1,p,e); for(i=1, #es, pri += es[i]; p = prime(pri); e = 1+is[i]-is[1+i]; d *= e; s *= ((p^e)-1)/(p-1); x *= (p^(e-1))); gcd(s,x*d));

Formula

a(n) = A324121(A122111(n)) = gcd(A323173(n), A122111(n)*A336315(n)).

A094471 a(n) = Sum_{(n - k)|n, 0 <= k <= n} k.

Original entry on oeis.org

0, 1, 2, 5, 4, 12, 6, 17, 14, 22, 10, 44, 12, 32, 36, 49, 16, 69, 18, 78, 52, 52, 22, 132, 44, 62, 68, 112, 28, 168, 30, 129, 84, 82, 92, 233, 36, 92, 100, 230, 40, 240, 42, 180, 192, 112, 46, 356, 90, 207, 132, 214, 52, 312, 148, 328, 148, 142, 58, 552, 60
Offset: 1

Views

Author

Labos Elemer, May 28 2004

Keywords

Comments

Not all values arise and some arise more than once.
Row sums of triangle A134866. - Gary W. Adamson, Nov 14 2007
Sum of the largest parts of the partitions of n into two parts such that the smaller part divides the larger. - Wesley Ivan Hurt, Dec 21 2017
a(n) is also the sum of all parts minus the total number of parts of all partitions of n into equal parts (an interpretation of the Torlach Rush's formula). - Omar E. Pol, Nov 30 2019
If and only if sigma(n) divides a(n), then n is one of Ore's Harmonic numbers, A001599. - Antti Karttunen, Jul 18 2020

Examples

			q^2 + 2*q^3 + 5*q^4 + 4*q^5 + 12*q^6 + 6*q^7 + 17*q^8 + 14*q^9 + ...
For n = 4 the partitions of 4 into equal parts are [4], [2,2], [1,1,1,1]. The sum of all parts is 4 + 2 + 2 + 1 + 1 + 1 + 1 = 12. There are 7 parts, so a(4) = 12 - 7 = 5. - _Omar E. Pol_, Nov 30 2019
		

References

  • P. A. MacMahon, Combinatory Analysis, Cambridge Univ. Press, London and New York, Vol. 1, 1915 and Vol. 2, 1916; see vol. 2, p 30.

Crossrefs

Cf. A000005, A000010, A000203, A001599, A038040, A134866, A152211, A244051, A324121 (= gcd(a(n), sigma(n))).
Cf. A088827 (positions of odd terms).

Programs

  • Julia
    using AbstractAlgebra
    function A094471(n)
        sum(k for k in 0:n if is_divisible_by(n, n - k))
    end
    [A094471(n) for n in 1:61] |> println  # Peter Luschny, Nov 14 2023
    
  • Maple
    with(numtheory); A094471:=n->n*tau(n)-sigma(n); seq(A094471(k), k=1..100); # Wesley Ivan Hurt, Oct 27 2013
    divides := (k, n) -> k = n or (k > 0 and irem(n, k) = 0):
    a := n -> local k; add(`if`(divides(n - k, n), k, 0), k = 0..n):
    seq(a(n), n = 1..61);  # Peter Luschny, Nov 14 2023
  • Mathematica
    Table[n*DivisorSigma[0, n] - DivisorSigma[1, n], {n, 1, 100}]
  • PARI
    {a(n) = n*numdiv(n) - sigma(n)} /* Michael Somos, Jan 25 2008 */
    
  • Python
    from math import prod
    from sympy import factorint
    def A094471(n):
        f = factorint(n).items()
        return n*prod(e+1 for p,e in f)-prod((p**(e+1)-1)//(p-1) for p,e in f)
    # Chai Wah Wu, Nov 14 2023
  • SageMath
    def A094471(n): return sum(k for k in (0..n) if (n-k).divides(n))
    print([A094471(n) for n in range(1, 62)])  # Peter Luschny, Nov 14 2023
    

Formula

a(n) = n*tau(n) - sigma(n) = n*A000005(n) - A000203(n). [Previous name.]
If p is prime, then a(p) = p*tau(p)-sigma(p) = 2p-(p+1) = p-1 = phi(p).
If n>1, then a(n)>0.
a(n) = Sum_{d|n} (n-d). - Amarnath Murthy, Jul 31 2005
G.f.: Sum_{k>=1} k*x^(2*k)/(1 - x^k)^2. - Ilya Gutkovskiy, Oct 24 2018
a(n) = A038040(n) - A000203(n). - Torlach Rush, Feb 02 2019

Extensions

Simpler name by Peter Luschny, Nov 14 2023

A336846 a(n) = gcd(sigma(A003961(n)), A000005(n)*A003961(n)).

Original entry on oeis.org

1, 2, 2, 1, 2, 12, 2, 4, 1, 4, 2, 6, 2, 12, 4, 1, 2, 2, 2, 2, 4, 4, 2, 120, 3, 12, 4, 6, 2, 24, 2, 2, 4, 4, 4, 1, 2, 12, 4, 8, 2, 24, 2, 26, 2, 12, 2, 6, 1, 6, 20, 18, 2, 24, 28, 24, 4, 4, 2, 12, 2, 4, 6, 1, 4, 24, 2, 2, 20, 24, 2, 20, 2, 12, 6, 6, 4, 24, 2, 2, 1, 4, 2, 36, 4, 12, 4, 8, 2, 4, 4, 6, 4, 12, 4, 12, 2, 2, 2, 3
Offset: 1

Views

Author

Antti Karttunen, Aug 06 2020

Keywords

Crossrefs

Programs

  • PARI
    A003961(n) = { my(f = factor(n)); for(i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); };
    A336846(n) = { my(u=A003961(n),s=sigma(u)); gcd(s, numdiv(n)*u); };

Formula

a(n) = gcd(A003973(n), A336845(n)) = gcd(A003973(n), A336841(n)).
a(n) = gcd(A000203(A003961(n)), A000005(n)*A003961(n)).
a(n) = A324121(A003961(n)).

A324122 a(n) = sigma(n) - gcd(n*d(n), sigma(n)), where d(n) = number of divisors of n (A000005) and sigma(n) = sum of divisors of n (A000203).

Original entry on oeis.org

0, 2, 2, 6, 4, 0, 6, 14, 12, 16, 10, 24, 12, 16, 12, 30, 16, 36, 18, 36, 28, 32, 22, 48, 30, 40, 36, 0, 28, 48, 30, 60, 36, 52, 44, 90, 36, 56, 52, 80, 40, 48, 42, 72, 72, 64, 46, 120, 54, 90, 60, 96, 52, 96, 68, 112, 76, 88, 58, 144, 60, 88, 102, 126, 80, 96, 66, 120, 84, 128, 70, 192, 72, 112, 122, 136, 92, 144, 78, 184, 120, 124, 82
Offset: 1

Views

Author

Antti Karttunen, Feb 15 2019

Keywords

Crossrefs

Cf. A001599 (positions of zeros).

Programs

  • PARI
    A324122(n) = (sigma(n) - gcd(sigma(n),n*numdiv(n)));

Formula

a(n) = A000203(n) - A324121(n) = A000203(n) - gcd(A000203(n), A038040(n)).

A336476 a(n) = gcd(A000593(n), A336475(n)).

Original entry on oeis.org

1, 1, 2, 1, 2, 2, 2, 1, 1, 2, 2, 2, 2, 2, 12, 1, 2, 1, 2, 2, 4, 2, 2, 2, 1, 2, 4, 2, 2, 12, 2, 1, 12, 2, 4, 1, 2, 2, 4, 2, 2, 4, 2, 2, 6, 2, 2, 2, 3, 1, 12, 2, 2, 4, 4, 2, 4, 2, 2, 12, 2, 2, 2, 1, 4, 12, 2, 2, 12, 4, 2, 1, 2, 2, 2, 2, 4, 4, 2, 2, 1, 2, 2, 4, 4, 2, 12, 2, 2, 6, 28, 2, 4, 2, 20, 2, 2, 3, 6, 1, 2, 12, 2, 2, 24
Offset: 1

Views

Author

Antti Karttunen, Jul 30 2020

Keywords

Comments

All odd terms k in A001599 (Ore's Harmonic numbers) satisfy a(k) = A336475(k).

Crossrefs

Programs

  • PARI
    A000593(n) = sigma(n>>valuation(n, 2));
    A336475(n) = { my(f=factor(n)); prod(i=1, #f~, if(2==f[i,1],1,(1+f[i,2]) * (f[i,1]^f[i,2]))); };
    A336476(n) = gcd(A000593(n), A336475(n));

Formula

a(n) = gcd(A000593(n), A336475(n)).
a(n) = A324121(A000265(n)).

A336320 Lexicographically earliest infinite sequence such that a(i) = a(j) => A324058(i) = A324058(j) for all i, j >= 0.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Jul 19 2020

Keywords

Comments

Restricted growth sequence transform of A324058.

Crossrefs

Cf. also A286622.

Programs

  • PARI
    up_to = 65537;
    rgs_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(om,invec[i]), my(pp = mapget(om, invec[i])); outvec[i] = outvec[pp] , mapput(om,invec[i],i); outvec[i] = u; u++ )); outvec; };
    A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); t }; \\ From A005940
    A324121(n) = gcd(sigma(n),n*numdiv(n));
    A324058(n) = A324121(A005940(1+n));
    v336320 = rgs_transform(vector(1+up_to,n,A324058(n-1)));
    A336320(n) = v336320[1+n];

A330606 Numbers k such that k*d(k) and sigma(k) are relatively prime, where d(k) is the number of divisors of k (A000005) and sigma(k) is their sum (A000203).

Original entry on oeis.org

1, 2, 4, 8, 9, 16, 25, 36, 64, 81, 100, 121, 128, 144, 225, 256, 289, 324, 400, 484, 512, 529, 576, 625, 729, 841, 900, 1024, 1089, 1156, 1250, 1296, 1600, 1681, 1936, 2025, 2116, 2209, 2304, 2401, 2500, 2601, 2809, 3025, 3364, 3481, 3600, 4096, 4356, 4624, 4761
Offset: 1

Views

Author

Amiram Eldar, Dec 20 2019

Keywords

Comments

If p is prime and p == 2 (mod 3) then p^2 is in the sequence.
Let E(x) = #{n | a(n) <= x} be the number of terms of this sequence up to x. Kanold proved that there are two constants 0 < c1 < c2 and a positive number x_0 such that c1 < E(x)/sqrt(x/log(x)) < c2 for x > x_0. De Koninck and Kátai proved that there is a positive constant c such that E(x) = c * (1 + o(1)) * sqrt(x/log(x)).
Apparently most of the terms are squares or powers of 2. Terms that are not included 1250, 4802, 31250, 57122, ...
Numbers k such that A099377(k) = A038040(k) and A099378(k) = A000203(k). - Amiram Eldar, Nov 02 2021

References

  • József Sándor, Dragoslav S. Mitrinovic, Borislav Crstici, Handbook of Number Theory I, Springer Science & Business Media, 2005, page 75.

Crossrefs

Programs

  • Magma
    [k:k in [1..5000]| Gcd(k*NumberOfDivisors(k),DivisorSigma(1,k)) eq 1]; // Marius A. Burtea, Dec 20 2019
  • Mathematica
    Select[Range[10^4], CoprimeQ[# * DivisorSigma[0, #], DivisorSigma[1, #]] &]
Showing 1-9 of 9 results.