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.

User: Laszlo Toth

Laszlo Toth's wiki page.

Laszlo Toth has authored 9 sequences.

A280184 Number of cyclic subgroups of the group C_n x C_n x C_n x C_n, where C_n is the cyclic group of order n.

Original entry on oeis.org

1, 16, 41, 136, 157, 656, 401, 1096, 1121, 2512, 1465, 5576, 2381, 6416, 6437, 8776, 5221, 17936, 7241, 21352, 16441, 23440, 12721, 44936, 19657, 38096, 30281, 54536, 25261, 102992, 30785, 70216, 60065, 83536, 62957, 152456, 52061, 115856, 97621, 172072, 70645, 263056, 81401, 199240, 175997, 203536, 106081, 359816, 137601, 314512
Offset: 1

Author

Laszlo Toth, Dec 28 2016

Keywords

Comments

Inverse Moebius transform of A160891. - Seiichi Manyama, May 12 2021

Programs

  • Maple
    with(numtheory):
    # define Jordan totient function J(r,n)
    J(r,n) := add(d^r*mobius(n/d), d in divisors(n)):
    seq(add(J(4,d)/phi(d), d in divisors(n)), n = 1..50); # Peter Bala, Jan 23 2024
  • Mathematica
    a[n_] := With[{dd = Divisors[n]}, Sum[Times @@ EulerPhi @ {x, y, z, t} / EulerPhi[LCM[x, y, z, t]], {x, dd}, {y, dd}, {z, dd}, {t, dd}]];
    Array[a, 50] (* Jean-François Alcover, Sep 28 2018 *)
    f[p_, e_] := 1 + (p^3 + p^2 + p + 1)*((p^(3*e) - 1)/(p^3 - 1)); a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 50] (* Amiram Eldar, Nov 15 2022 *)
  • PARI
    a(n) = sumdiv(n, x, sumdiv(n, y, sumdiv(n, z, sumdiv(n, t, eulerphi(x)*eulerphi(y)*eulerphi(z)*eulerphi(t)/eulerphi(lcm([x, y, z, t])))))); \\ Michel Marcus, Feb 26 2018
    
  • PARI
    a160891(n) = sumdiv(n, d, moebius(n/d)*d^4)/eulerphi(n);
    a(n) = sumdiv(n, d, a160891(d)); \\ Seiichi Manyama, May 12 2021

Formula

a(n) = Sum_{a|n, b|n, c|n, d|n} phi(a)*phi(b)*phi(c)*phi(d)/phi(lcm(a, b, c, d)), where phi is Euler totient function (cf. A000010).
From Amiram Eldar, Nov 15 2022: (Start)
Multiplicative with a(p^e) = 1 + (p^3 + p^2 + p + 1)*((p^(3*e) - 1)/(p^3 - 1)).
Sum_{k=1..n} a(k) ~ c * n^4, where c = (zeta(4)/4) * Product_{p prime} (1 + 1/p^2 + 1/p^3 + 1/p^4) = 0.5010902655... . (End)
a(n) = Sum_{d divides n} J_4(d)/phi(d) = Sum_{1 <= i, j, k, l <= n} 1/phi(n/gcd(i,j,k,l,n)), where the Jordan totient function J_4(n) = A059377(n). - Peter Bala, Jan 23 2024

A280162 Number of subgroups of the group C_n x C_n x C_n x C_n, where C_n is the cyclic group of order n.

Original entry on oeis.org

1, 67, 212, 1983, 1120, 14204, 3652, 43339, 24033, 75040, 19156, 420396, 35872, 244684, 237440, 821335, 99472, 1610211, 152404, 2220960, 774224, 1283452, 318532, 9187868, 810969, 2403424, 2222704, 7241916, 783904, 15908480, 1016836, 14445411, 4061072, 6664624, 4090240, 47657439, 2031712
Offset: 1

Author

Laszlo Toth, Dec 27 2016

Keywords

Crossrefs

Programs

  • PARI
    \\ For numsubgrp, see the Alekseyev link.
    a(n)=my(f=factor(n)); prod(i=1,#f~, numsubgrp(f[i,1],f[i,2]*[1,1,1,1])) \\ Charles R Greathouse IV, Dec 27 2016

Extensions

Terms a(32) and beyond from Charles R Greathouse IV, Dec 27 2016

A240547 Number of non-congruent solutions of x^2 + y^2 + z^2 + t^2 == 0 mod n.

Original entry on oeis.org

1, 8, 33, 32, 145, 264, 385, 128, 945, 1160, 1441, 1056, 2353, 3080, 4785, 512, 5185, 7560, 7201, 4640, 12705, 11528, 12673, 4224, 18625, 18824, 26001, 12320, 25201, 38280, 30721, 2048, 47553, 41480, 55825, 30240, 51985, 57608, 77649, 18560, 70561, 101640
Offset: 1

Author

Laszlo Toth, Apr 07 2014

Keywords

Examples

			For n=2 the a(2)=8 solutions are (0,0,0,0), (1,1,0,0), (1,0,1,0), (1,0,0,1), (0,1,1,0), (0,1,0,1), (0,0,1,1), (1,1,1,1).
		

Programs

  • Maple
    A240547 := proc(n) local a, x, y, z, t ; a := 0 ; for x from 0 to n-1 do for y
    from 0 to n-1 do for z from 0 to n-1 do for t from 0 to n-1 do if
    (x^2+y^2+z^2+t^2) mod n = 0 mod n then a := a+1 ; fi; od; od ; od; od;
    a ; end proc;
    # alternative
    A240547 := proc(n)
        a := 1;
        for pe in ifactors(n)[2] do
            p := op(1,pe) ;
            e := op(2,pe) ;
            if p = 2 then
                a := a*p^(2*e+1) ;
            else
                a := a* p^(2*e-1)*(p^(e+1)+p^e-1) ;
            end if;
        end do:
        a ;
    end proc:
    seq(A240547(n),n=1..100) ; # R. J. Mathar, Jun 25 2018
  • Mathematica
    b[2, e_] := 2^(2 e + 1);
    b[p_, e_] := p^(2 e - 1)*(p^(e + 1) + p^e - 1);
    a[n_] := Times @@ b @@@ FactorInteger[n];
    Array[a, 42] (* Jean-François Alcover, Dec 05 2017 *)
  • PARI
    a(n) = my(m); if( n<1, 0, forvec( v = vector(4, i, [0, n-1]), m += (0 == norml2(v)%n))); m /* Michael Somos, Apr 07 2014 */
    
  • PARI
    a(n) = {my(f = factor(n), res = 1, start = 1, p, e, i); if(n % 2 == 0, res = 1<<(f[1,2]<<1+1); start = 2); for(i = start, #f~, p = f[i, 1]; e = f[i, 2]; res*=(p^(e<<1-1)*(p^(e+1)+p^e-1))); res} \\ David A. Corneth, Jul 22 2018

Formula

Multiplicative, with a(2^e) = 2^(2e+1) for e>=1, a(p^e) = p^(2e-1)*(p^(e+1)+p^e-1) for p > 2, e>=1.
For odd n, a(n) = A069097(n)*n = A020478(n). - R. J. Mathar, Jun 23 2018
Sum_{k=1..n} a(k) ~ c * n^4 + O(n^3 * log(n)), where c = 5*Pi^2/(168*zeta(3)) = 0.244362... (Tóth, 2014). - Amiram Eldar, Oct 18 2022

A200758 Superimperfect numbers.

Original entry on oeis.org

2, 4, 8, 128, 32768, 2147483648
Offset: 1

Author

Laszlo Toth, Nov 22 2011

Keywords

Comments

A number n is said to be superimperfect if 2*beta(beta(n)) = n, where beta is the multiplicative function defined by beta(p^e) = p^e - p^(e-1) + p^(e-2) - ... + (-1)^e for every prime power p^e. The function beta is called the alternating sum-of-divisors function. Here beta(n) is the absolute value of A061020(n). There are no other superimperfect numbers up to 10^7. The number 2^(2^k-1) is superimperfect if and only if k=1,2,3,4,5.

Programs

  • PARI
    beta(n)=sumdiv(n,d,(-1)^bigomega(n/d)*d)
    for(n=1,1e8,if(2*beta(beta(n))==n,print1(n", "))) \\ Charles R Greathouse IV, Nov 22 2011
    
  • PARI
    ak(p,e)=my(s=1); for(i=1,e, s=s*p + (-1)^i); s
    beta(n)=my(f=factor(n)); prod(i=1,#f~, ak(f[i,1],f[i,2]))
    is(n)=my(b=beta(n)); 2*b-2 >= n && 2*beta(b)==n \\ Charles R Greathouse IV, Dec 27 2016

A199806 Alternating LCM-sum: a(n) = Sum_{k=1..n} (-1)^(k-1)*lcm(k,n).

Original entry on oeis.org

1, 0, 0, 8, -5, 18, -14, 80, -9, 100, -44, 204, -65, 294, 30, 672, -119, 540, -152, 1040, 63, 1210, -230, 1752, -75, 2028, -54, 2996, -377, 2190, -434, 5440, 165, 4624, 280, 5472, -629, 6498, 234, 8800, -779, 6300, -860, 12188, 225, 11638, -1034, 14256, -245, 13000
Offset: 1

Author

Laszlo Toth, Nov 10 2011

Keywords

Crossrefs

Programs

A166234 The inverse of the constant 1 function under the exponential convolution (also called the exponential Möbius function).

Original entry on oeis.org

1, 1, 1, -1, 1, 1, 1, -1, -1, 1, 1, -1, 1, 1, 1, 0, 1, -1, 1, -1, 1, 1, 1, -1, -1, 1, -1, -1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, -1, 1, 1, 0, -1, -1, 1, -1, 1, -1, 1, -1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 0, 0, 1, 1, -1, 1, 1, 1, -1, 1, -1, 1
Offset: 1

Author

Laszlo Toth, Oct 09 2009

Keywords

Crossrefs

Cf. A008683, A049419, A051377, A124010, A209802 (partial sums).

Programs

  • Haskell
    a166234 = product . map (a008683 . fromIntegral) . a124010_row
    -- Reinhard Zumkeller, Mar 13 2012
    
  • Maple
    A166234 := proc(n)
        local a,p;
        a := 1;
        if n =1 then
            ;
        else
            for p in ifactors(n)[2] do
                        a := a*numtheory[mobius](op(2,p)) ;
            end do:
        end if;
        a ;
    end proc:# R. J. Mathar, Nov 30 2016
  • Mathematica
    a[n_] := Times @@ MoebiusMu /@ FactorInteger[n][[All, 2]];
    Array[a, 100] (* Jean-François Alcover, Nov 16 2017 *)
  • PARI
    a(n)=factorback(apply(moebius, factor(n)[,2])) \\ Charles R Greathouse IV, Sep 02 2015

Formula

Multiplicative, a(p^e) = mu(e) for any prime power p^e (e>=1), where mu is the Möbius function A008683.
a(A130897(n)) = 0; a(A209061(n)) <> 0. - Reinhard Zumkeller, Mar 13 2012
Asymptotic mean: lim_{n->oo} (1/n) * Sum_{k=1..n} a(k) = Product_{p prime} (1 + Sum_{k>=2} (mu(k) - mu(k-1))/p^k) = 0.3609447238... (Tóth, 2007). - Amiram Eldar, Nov 08 2020

A145388 Sum of (k,n)* for k=1,2,...,n, where (k,n)* is the greatest divisor of k which is a unitary divisor of n.

Original entry on oeis.org

1, 3, 5, 7, 9, 15, 13, 15, 17, 27, 21, 35, 25, 39, 45, 31, 33, 51, 37, 63, 65, 63, 45, 75, 49, 75, 53, 91, 57, 135, 61, 63, 105, 99, 117, 119, 73, 111, 125, 135, 81, 195, 85, 147, 153, 135, 93, 155, 97, 147, 165, 175, 105, 159
Offset: 1

Author

Laszlo Toth, Oct 10 2008

Keywords

Comments

A unitary analog of Pillai's function A018804; another unitary analog of A018804 is A089912.
The sequence is the row sums of the following triangle of (k,n)* with rows n and columns 1 <= k <= n (_R. J. Mathar, Jun 01 2011):
1;
1, 2;
1, 1, 3;
1, 1, 1, 4;
1, 1, 1, 1, 5;
1, 2, 3, 2, 1, 6;
1, 1, 1, 1, 1, 1, 7;
1, 1, 1, 1, 1, 1, 1, 8;
1, 1, 1, 1, 1, 1, 1, 1, 9;
1, 2, 1, 2, 5, 2, 1, 2, 1, 10;
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 11;
1, 1, 3, 4, 1, 3, 1, 4, 3, 1, 1, 12;
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 13;
1, 2, 1, 2, 1, 2, 7, 2, 1, 2, 1, 2, 1, 14;
Sum_{k<=x} a(n) = Ax^2 log x + O(x^2) with A = Product(1 - 1/(p+1)^2) * 3/Pi^2 = 0.23584030... where the product is over the primes. That is, the average value of a(n) is A n log n. - Charles R Greathouse IV, Mar 21 2012

Crossrefs

Programs

  • Maple
    A145388 := proc(n) option remember; local pf,p ; if n = 1 then 1; else pf := ifactors(n)[2] ; if nops(pf) = 1 then 2*n-1 ; else mul(procname(op(1,p)^op(2,p)),p=pf) ; end if; end if; end proc:
    seq(A145388(n),n=1..70) ; # R. J. Mathar, Jan 07 2011
  • Mathematica
    f[p_, e_] := 2*p^e - 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, May 29 2020 *)
  • PARI
    a(n)=n=factor(n);prod(i=1,#n[,1],2*n[i,1]^n[i,2]-1) \\ Charles R Greathouse IV, Mar 21 2012
    
  • Python
    from math import prod
    from sympy import factorint
    def A145388(n): return prod((p**e<<1)-1 for p,e in factorint(n).items()) # Chai Wah Wu, Feb 13 2025

Formula

Multiplicative: a(p^e) = 2*p^e - 1 for every prime power p^e.
a(n) = Sum_{k=1..n} A034444(n/gcd(n,k)) = Sum_{d|n} A000010(d) * A034444(d). - Daniel Suteu, May 26 2019
a(n) = Sum_{d|n, gcd(d, n/d) = 1} d * uphi(n/d), where uphi is A047994. - Amiram Eldar, May 29 2020
a(n) = Sum_{d|n} abs(A023900(d))*n/d. Verified for the first 10000 terms. - Mats Granvik, Feb 13 2021

A143869 An integer k is called regular (mod n) if there is an integer x such that k^2 x == k (mod n). Then these numbers are the sum of regular integers k (mod n) such that 1 <= k <= n for n=1,2,... .

Original entry on oeis.org

1, 3, 6, 8, 15, 21, 28, 24, 36, 55, 66, 60, 91, 105, 120, 80, 153, 135, 190, 160, 231, 253, 276, 192, 275, 351, 270, 308, 435, 465, 496, 288, 561, 595, 630, 396, 703, 741, 780, 520, 861, 903, 946, 748, 810, 1081, 1128, 672, 1078, 1075, 1326, 1040, 1431, 1053
Offset: 1

Author

Laszlo Toth, Sep 04 2008

Keywords

Crossrefs

Programs

  • PARI
    isregu(k, n) = {g = gcd(k, n); if ((n % g == 0) && (gcd(g, n/g) == 1), return(k), return(0));}
    a(n) = sum(k=1, n, isregu(k, n)) \\ Michel Marcus, May 25 2013

Formula

a(n) = n*(A055653(n)+1)/2.

Extensions

Extended by R. J. Mathar, Sep 05 2008

A130897 Numbers that are not exponentially squarefree.

Original entry on oeis.org

16, 48, 80, 81, 112, 144, 162, 176, 208, 240, 256, 272, 304, 324, 336, 368, 400, 405, 432, 464, 496, 512, 528, 560, 567, 592, 624, 625, 648, 656, 688, 720, 752, 768, 784, 810, 816, 848, 880, 891, 912, 944, 976
Offset: 1

Author

Laszlo Toth, Mar 18 2011

Keywords

Comments

A positive integer is called exponentially squarefree (e-squarefree) if in its prime power factorization all the exponents are squarefree.
a(n) is the sequence of positive integers in which prime power factorization there is at least one nonsquarefree exponent.
n is non-e-squarefree iff f(n)=0, where f(n) is the exponential Moebius function A166234.
Product_{k = 1..A001221(n)} A008966(A124010(n,k)) = 0. - Reinhard Zumkeller, Mar 13 2012
The density of {a(n)} is 0.04407699... (see comment in A209061). - Peter J. C. Moses and Vladimir Shevelev, Sep 08 2015

Examples

			16=2^4, 48=2^4*3, 256=2^8 are non-e-squarefree, since 4 and 8 are nonsquarefree.
		

Crossrefs

Complement of A209061; subsequence of A013929, A046099, and A046101.

Programs

  • Haskell
    a130897 n = a130897_list !! (n-1)
    a130897_list = filter
       (any (== 0) . map (a008966 . fromIntegral) . a124010_row) [1..]
    -- Reinhard Zumkeller, Mar 13 2012
    
  • Maple
    filter:=n ->  not andmap(t -> numtheory:-issqrfree(t[2]), ifactors(n)[2]);
    select(filter, [$1..1000]); # Robert Israel, Sep 03 2015
  • Mathematica
    Select[Range@ 1000, ! AllTrue[Last /@ FactorInteger@ #, SquareFreeQ] &] (* Michael De Vlieger, Sep 07 2015, Version 10 *)
  • PARI
    is(n)=my(f=factor(n)[, 2]); for(i=1, #f, if(!issquarefree(f[i]), return(1))); 0 \\ Charles R Greathouse IV, Sep 03 2015