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 11-20 of 20 results.

A054584 Number of subgroups of the group generated by a^n=1, b^3=1 and ab=ba.

Original entry on oeis.org

2, 4, 6, 6, 4, 12, 4, 8, 10, 8, 4, 18, 4, 8, 12, 10, 4, 20, 4, 12, 12, 8, 4, 24, 6, 8, 14, 12, 4, 24, 4, 12, 12, 8, 8, 30, 4, 8, 12, 16, 4, 24, 4, 12, 20, 8, 4, 30, 6, 12, 12, 12, 4, 28, 8, 16, 12, 8, 4, 36, 4, 8, 20, 14, 8, 24, 4, 12, 12, 16, 4, 40, 4, 8, 18, 12, 8, 24, 4, 20, 18, 8, 4
Offset: 1

Views

Author

John W. Layman, Apr 12 2000

Keywords

Comments

Also the number of subgroups of the group C_n X C_3 (where C_n is the cyclic group of order n). Number of subgroups of the group C_n X C_m is Sum_{i|n,j|m} gcd(i,j).

Crossrefs

Programs

  • Haskell
    a054584 n = a000005 n + 3 * a079978 n * a000005 (a051176 n) + a035191 n
    -- Reinhard Zumkeller, Aug 27 2012
  • Maple
    for n from 1 to 500 do a := ifactors(n):s := 1:for k from 1 to nops(a[2]) do p := a[2][k][1]:e := a[2][k][2]: if p=3 then b := 2*e+1:else b := e+1:fi:s := s*b:od:printf(`%d,`,2*s); od:
  • Mathematica
    f[d_ /; Mod[d, 3] == 0] = 4; f[] = 2; a[n] := Total[f /@ Divisors[n]]; Table[a[n], {n, 1, 100}](* Jean-François Alcover, Nov 21 2011, after Michael Somos *)
    f[p_, e_] := e + 1; f[3, e_] := 2*e + 1; a[1] = 2; a[n_] := 2*Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Nov 29 2022 *)
  • PARI
    a(n)=if(n<1, 0, sumdiv(n,d, (d%3==0)*2+2)) /* Michael Somos, Sep 20 2005 */
    

Formula

a(n) = tau(n)+3*tau(n/3)+A035191(n) if n is congruent to 0 mod 3 else tau(n)+A035191(n), where A035191(n) is the number of divisors of n that are not congruent to 0 mod 3.
a(n)/2 is multiplicative with a(3^e)=2e+1 and a(p^e)=e+1 for p<>3.
Moebius transform is period 3 sequence [2, 2, 4, ...]. - Michael Somos, Sep 20 2005
G.f.: Sum_{k>0} x^k(2+2*x^k+4*x^(2k))/(1-x^(3k)).
From Amiram Eldar, Nov 29 2022: (Start)
Dirichlet g.f.: 2 * zeta(s)^2 * (1 + 1/3^s).
Sum_{k=1..n} a(k) ~ 2*(4*n*log(n) + (8*gamma - 4 - log(3))*n)/3, where gamma is Euler's constant (A001620). (End)

Extensions

Additional comments from Vladeta Jovovic, Oct 25 2001

A087560 Smallest m > n such that gcd(m, n^2) = n.

Original entry on oeis.org

2, 6, 6, 12, 10, 30, 14, 24, 18, 30, 22, 60, 26, 42, 30, 48, 34, 90, 38, 60, 42, 66, 46, 120, 50, 78, 54, 84, 58, 210, 62, 96, 66, 102, 70, 180, 74, 114, 78, 120, 82, 210, 86, 132, 90, 138, 94, 240, 98, 150, 102, 156, 106, 270, 110, 168, 114, 174, 118, 420, 122
Offset: 1

Views

Author

Reinhard Zumkeller, Oct 24 2003

Keywords

Comments

Equals n multiplied by the least nontrivial number coprime to n. - Amarnath Murthy, Nov 20 2005

Crossrefs

Programs

  • Mathematica
    Table[n*Select[Prime[Range[Log2[n] + 1]], ! Divisible[n, #] &][[1]], {n, 61}] (* Ivan Neretin, May 21 2015 *)
  • PARI
    a(n) = forprime(p = 2, , if(n%p, return(n*p))); \\ Amiram Eldar, Feb 01 2025

Formula

a(n) = n*A053669(n).
A000005(a(n)) = 2*A000005(n) = A062011(n). - Reinhard Zumkeller, May 17 2006
Sum_{k=1..n} ~ c * n^2 / 2, where c = A249270. - Amiram Eldar, Feb 01 2025

A119416 n * (smallest prime greater than largest prime factor of n).

Original entry on oeis.org

2, 6, 15, 12, 35, 30, 77, 24, 45, 70, 143, 60, 221, 154, 105, 48, 323, 90, 437, 140, 231, 286, 667, 120, 175, 442, 135, 308, 899, 210, 1147, 96, 429, 646, 385, 180, 1517, 874, 663, 280, 1763, 462, 2021, 572, 315, 1334, 2491, 240, 539, 350, 969, 884, 3127, 270
Offset: 1

Views

Author

Reinhard Zumkeller, May 17 2006

Keywords

Comments

a(n) = n * A117366(n);
A000005(a(n)) = 2*A000005(n) = A062011(n).

Examples

			a(10) = (2*5)*7.
		

Crossrefs

Programs

  • Haskell
    a119416 n = n * (a151800 $ a006530 n) -- Reinhard Zumkeller, Apr 06 2015
  • Mathematica
    Insert[Table[n*Prime[PrimePi[FactorInteger[n][[ -1]][[1]]] + 1],{n,2,100}], 2, 1] (* Stefan Steinerberger, May 18 2006 *)

Formula

a(n) = n * A151800(A006530(n)). - Reinhard Zumkeller, Apr 06 2015

A152771 a(n) = sigma(n) - 2*d(n) + 1.

Original entry on oeis.org

0, 0, 1, 2, 3, 5, 5, 8, 8, 11, 9, 17, 11, 17, 17, 22, 15, 28, 17, 31, 25, 29, 21, 45, 26, 35, 33, 45, 27, 57, 29, 52, 41, 47, 41, 74, 35, 53, 49, 75, 39, 81, 41, 73, 67, 65, 45, 105, 52, 82, 65, 87, 51, 105, 65, 105, 73, 83, 57, 145
Offset: 1

Views

Author

Omar E. Pol, Dec 14 2008

Keywords

Crossrefs

Programs

  • Mathematica
    Table[DivisorSigma[1, n] - 2 DivisorSigma[0, n] + 1, {n, 60}] (* Ivan Neretin, Sep 30 2017 *)
  • PARI
    a(n) = sigma(n) - 2*numdiv(n) + 1; \\ Michel Marcus, Sep 30 2017

Formula

a(n) = A000203(n) - 2*A000005(n) + 1 = A000203(n) - A114003(n) = A088580(n) - A062011(n). - Omar E. Pol, Sep 30 2017
G.f.: Sum_{k>=1} x^(3*k) / (1 - x^k)^2. - Ilya Gutkovskiy, Apr 24 2021

A340524 Triangle read by rows: T(n,k) = A000005(n-k+1)*A002865(k-1), 1 <= k <= n.

Original entry on oeis.org

1, 2, 0, 2, 0, 1, 3, 0, 2, 1, 2, 0, 2, 2, 2, 4, 0, 3, 2, 4, 2, 2, 0, 2, 3, 4, 4, 4, 4, 0, 4, 2, 6, 4, 8, 4, 3, 0, 2, 4, 4, 6, 8, 8, 7, 4, 0, 4, 2, 8, 4, 12, 8, 14, 8, 2, 0, 3, 4, 4, 8, 8, 12, 14, 16, 12, 6, 0, 4, 3, 8, 4, 16, 8, 21, 16, 24, 14, 2, 0, 2, 4, 6, 8, 8, 16, 14, 24, 24, 28, 21
Offset: 1

Views

Author

Omar E. Pol, Jan 10 2021

Keywords

Comments

Conjecture: the sum of row n equals A138137(n), the total number of parts in the last section of the set of partitions of n.

Examples

			Triangle begins:
1;
2, 0;
2, 0, 1;
3, 0, 2, 1;
2, 0, 2, 2, 2;
4, 0, 3, 2, 4, 2;
2, 0, 2, 3, 4, 4,  4;
4, 0, 4, 2, 6, 4,  8,  4;
3, 0, 2, 4, 4, 6,  8,  8,  7;
4, 0, 4, 2, 8, 4, 12,  8, 14,  8;
2, 0, 3, 4, 4, 8,  8, 12, 14, 16, 12;
6, 0, 4, 3, 8, 4, 16,  8, 21, 16, 24, 14;
2, 0, 2, 4, 6, 8,  8, 16, 14, 24, 24, 28, 21;
...
For n = 6 the calculation of every term of row 6 is as follows:
--------------------------
k   A002865         T(6,k)
--------------------------
1      1   *   4   =   4
2      0   *   2   =   0
3      1   *   3   =   3
4      1   *   2   =   2
5      2   *   2   =   4
6      2   *   1   =   2
.           A000005
--------------------------
The sum of row 6 is 4 + 0 + 3 + 2 + 4 + 2 = 15, equaling A138137(6) = 15.
		

Crossrefs

Row sums give A138137 (conjectured).
Columns 1, 3 and 4 are A000005.
Column 2 gives A000004.
Columns 5 and 6 give A062011.
Columns 7 and 8 give A145154, n >= 1.
Leading diagonal gives A002865.
Cf. A339304 (irregular or expanded version).

Programs

  • PARI
    f(n) = if (n==0, 1, numbpart(n) - numbpart(n-1)); \\ A002865
    T(n, k) = numdiv(n-k+1) * f(k-1); \\ Michel Marcus, Jan 13 2021

A349410 Length of cycle reached when iterating the mapping x-> n*A000005(x) on 1.

Original entry on oeis.org

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

Views

Author

Tejo Vrush, Nov 16 2021

Keywords

Examples

			For n = 9, 1 --> 9 --> 27 --> 36 --> 81 --> 45 --> 54 --> 72 --> 108 --> 108. The cycle reached has just one term: 108. Therefore, a(9) = 1.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Module[{s = NestWhileList[n * DivisorSigma[0, #] &, 1, UnsameQ, All]}, Differences[Position[s, s[[-1]]]][[1, 1]]]; Array[a, 100] (* Amiram Eldar, Nov 17 2021 *)
  • PARI
    f(n, x) = n*numdiv(x);
    find(nm, v) = {forstep (n=#v-1, 1, -1, if (v[#v] == v[n], return(#v-n);););}
    a(n) = {my(list = List(), found=0, m=n); listput(list, m); while (! found, my(nm = f(n, m)); listput(list, nm); found = find(nm, list); m = nm;); found;} \\ Michel Marcus, Nov 17 2021
  • Python
    from sympy import divisor_count
    terms = []
    for n in range(1, 101):
        s, t = [1], True
        while t:
            for i in range(2, len(s)):
                if s[-i] == s[-1]:
                    t = False
                    terms.append(i - 1)
                    break
            s.append(n*divisor_count(s[-1]))
    print(terms) # Gleb Ivanov, Nov 17 2021
    

Formula

a(A000040(n)) = 1.

A146208 a(n) is the number of arithmetic progressions of 2 or more integers with product = n.

Original entry on oeis.org

4, 6, 6, 4, 10, 4, 11, 8, 10, 4, 12, 4, 8, 12, 12, 4, 12, 4, 12, 10, 8, 4, 26, 6, 8, 9, 14, 4, 16, 4, 13, 8, 8, 10, 20, 4, 8, 8, 20, 4, 18, 4, 12, 16, 8, 4, 26, 6, 12, 8, 12, 4, 16, 10, 16, 8, 8, 4, 26, 4, 8, 14, 19, 8, 18, 4, 12, 8, 16, 4, 24, 4, 8, 12
Offset: 2

Views

Author

Naohiro Nomoto, Oct 28 2008

Keywords

Comments

a(n)=number of all integer triples (x,y,z) such that Product_{k=0..z} (x + (y*k)) = n, where n>1, z>0.

Examples

			a(8) = 11 as we can have
 (x=-8,y=7,z=1; -8 * -1),
 (x=-4,y=2,z=1; -4 * -2),
 (x=-4,y=3,z=2; -4 * -1 * 2),
 (x=-2,y=-2,z=1; -2 * -4),
 (x=-1,y=-7,z=1; -1 * -8),
 (x=1,y=7,z=1; 1 * 8),
 (x=2,y=-3,z=2; 2 * -1 * -4),
 (x=2,y=0,z=2; 2 * 2 * 2),
 (x=2,y=2,z=1; 2 * 4),
 (x=4,y=-2,z=1; 4 * 2),
 (x=8,y=-7,z=1; 8 * 1). - Example added by _Antti Karttunen_, Feb 28 2023
a(9) = 8 as we can have
 (x=-3,y=0,z=1; -3 * -3),
 (x=3,y=0,z=1; 3 * 3),
 (x=-9,y=8,z=1; -9 * -1),
 (x=1,y=8,z=1; 1 * 9),
 (x=-1,y=-8,z=1; -1 * -9),
 (x=9,y=-8,z=1; 9 * 1),
 (x=3,y=-2,z=3; 3 * 1 * -1 * -3),
 (x=-3,y=2,z=3; -3 * -1 * 1 * 3).
		

Crossrefs

Programs

  • PARI
    A146208(n) = sum(x=-n,n,sum(y=-n,n,sum(z=1,n,n==prod(k=0,z,x+(y*k))))); \\ (Slow!) - Antti Karttunen, Feb 28 2023
    
  • Python
    from sympy import divisors
    def A146208(n):
        ds = divisors(n)
        c, s = 0, [-d for d in ds[::-1]]+ds
        for x in s:
            d2 = [d//x for d in ds if d%x==0]
            for y in (f-x for f in [-d for d in d2[::-1]]+d2):
                m, k = x*(z:=x+y), 1
                while n >= abs(m) and k<=n:
                    if n == m:
                        c += 1
                    z += y
                    m *= z
                    k += 1
        return c # Chai Wah Wu, May 11 2023

Formula

a(n) = A062011(n) + A361015(n). - Antti Karttunen, Feb 28 2023

A361015 Number of arithmetic progressions of 3 or more integers whose product is equal to n.

Original entry on oeis.org

0, 2, 0, 0, 2, 0, 3, 2, 2, 0, 0, 0, 0, 4, 2, 0, 0, 0, 0, 2, 0, 0, 10, 0, 0, 1, 2, 0, 0, 0, 1, 0, 0, 2, 2, 0, 0, 0, 4, 0, 2, 0, 0, 4, 0, 0, 6, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 2, 0, 0, 2, 5, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 6, 4, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20
Offset: 2

Views

Author

Antti Karttunen, Feb 28 2023

Keywords

Comments

Number of all integer triples (x,y,z) such that Product_{k=0..z} (x + (y*k)) = n, where n > 1, z > 1.

Examples

			a(3) = 2 as we have solutions (x=-3,y=2,z=2; -3 * -1 * 1) and (x=1,y=-2,z=2; 1 * -1 * -3).
a(8) = 3 as we have solutions  (x=-4,y=3,z=2; -4 * -1 * 2), (x=2,y=-3,z=2; 2 * -1 * -4), and (x=2,y=0,z=2; 2*2*2).
a(27) = 1 as we have a unique solution (x=3,y=0,z=2; 3*3*3).
a(32) = 1 as we have a unique solution (x=2,y=0,z=4; 2*2*2*2*2).
a(64) = 5 as we have solutions (x=-8,y=6,z=2; -8 * -2 * 4), (x=-2,y=0,z=5; (-2)^6), (x=2,y=0,z=5; 2^6), (x=4,y=-6,z=2; 4 * -2 * -8), and (x=4,y=0,z=2; 4*4*4).
a(81) = 4 as we have solutions (x=-9,y=6,z=2; -9 * -3 * 3), (x=-3,y=0,z=3; -3 * -3 * -3 * -3), (x=3,y=-6,z=2; 3 * -3 * -9), and (x=3,y=0,z=3; 3*3*3*3).
a(300) = 2 as we have solutions (x=-25,y=13,z=2; -25 * -12 * 1) and (x=1,y=-13,z=2; 1 * -12 * -25).
		

Crossrefs

Programs

  • PARI
    A361015(n) = sum(x=-n,n,sum(y=-n,n,sum(z=2,n,n==prod(k=0,z,x+(y*k))))); \\ (Slow!)
    
  • Python
    from sympy import divisors
    def A361015(n):
        ds = divisors(n)
        c, s = -len(ds)<<1, [-d for d in ds[::-1]]+ds
        for x in s:
            d2 = [d//x for d in ds if d%x==0]
            for y in (f-x for f in [-d for d in d2[::-1]]+d2):
                m, k = x*(z:=x+y), 1
                while n >= abs(m) and k<=n:
                    if n == m:
                        c += 1
                    z += y
                    m *= z
                    k += 1
        return c # Chai Wah Wu, May 11 2023

Formula

a(n) = A146208(n) - A062011(n).

A131089 a(n) = Sum_{d|n} (2 - mu(d)).

Original entry on oeis.org

1, 4, 4, 6, 4, 8, 4, 8, 6, 8, 4, 12, 4, 8, 8, 10, 4, 12, 4, 12, 8, 8, 4, 16, 6, 8, 8, 12, 4, 16, 4, 12, 8, 8, 8, 18, 4, 8, 8, 16, 4, 16, 4, 12, 12, 8, 4, 20, 6, 12, 8, 12, 4, 16, 8, 16, 8, 8, 4, 24, 4, 8, 12, 14, 8, 16, 4, 12, 8, 16, 4, 24, 4, 8, 12, 12, 8, 16
Offset: 1

Views

Author

Gary W. Adamson, Jun 14 2007

Keywords

Comments

Apart from the first term the same as A062011. - Andrew Howroyd, Aug 09 2018

Examples

			a(4) = 6 = (2 + 3 + 0 + 1), row 4 of A131088.
		

Crossrefs

Row sums of triangle A131088.

Programs

  • Magma
    [1] cat [2*NumberOfDivisors(n) : n in [2..100] ]; // Vincenzo Librandi, Aug 10 2018
  • Mathematica
    Join[{1}, Table[2 DivisorSigma[0, n], {n, 100}]] (* Vincenzo Librandi, Aug 10 2018 *)
  • PARI
    a(n)={2*numdiv(n) - (n==1)} \\ Andrew Howroyd, Aug 09 2018
    

Formula

a(n) = 2*tau(n) = A062011(n) for n > 1. - Andrew Howroyd, Aug 09 2018
Inverse Moebius transform of A228483.

Extensions

Name changed and terms a(10) and beyond from Andrew Howroyd, Aug 09 2018

A307179 Numbers k such that k = i*j = 6*i + j, where i and j are integers.

Original entry on oeis.org

-25, -8, -3, 0, 24, 27, 32, 49
Offset: 1

Views

Author

Scott R. Shannon, Mar 27 2019

Keywords

Comments

The sequence can be found by solving the equality i*j = 6*i + j. Re-arranging for j gives j = 6 + 6/(i-1). As both i and j must be integers this implies i - 1 must divide 6, thus the only values for i are -5,-2,-1,0,2,3,4,7. Finding the corresponding j and multiplying gives the 8 sequences values.
In general if we replace 6 by n, then the number of solutions will be 2*A000005(n), the lowest value will be -(n - 1)^2, and the highest value will be (n + 1)^2.
For values k>=0 this sequence gives the possible point scores in Australian Rules Football which equal the corresponding number of goals (worth six points) times the number of behinds (worth one point).
The number of solutions, in this case 8, is given by A062011(6). Robert G. Wilson v, Apr 10 2019

Examples

			The 8 solutions are:
--------------
i   j    k
--------------
-5   5   -25
-2   4   -8
-1   3   -3
0   0    0
2   12   24
3   9    27
4   8    32
7   7    49
		

Crossrefs

Previous Showing 11-20 of 20 results.