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-10 of 17 results. Next

A014197 Number of numbers m with Euler phi(m) = n.

Original entry on oeis.org

2, 3, 0, 4, 0, 4, 0, 5, 0, 2, 0, 6, 0, 0, 0, 6, 0, 4, 0, 5, 0, 2, 0, 10, 0, 0, 0, 2, 0, 2, 0, 7, 0, 0, 0, 8, 0, 0, 0, 9, 0, 4, 0, 3, 0, 2, 0, 11, 0, 0, 0, 2, 0, 2, 0, 3, 0, 2, 0, 9, 0, 0, 0, 8, 0, 2, 0, 0, 0, 2, 0, 17, 0, 0, 0, 0, 0, 2, 0, 10, 0, 2, 0, 6, 0, 0, 0, 6, 0, 0, 0, 3
Offset: 1

Views

Author

Keywords

Comments

Carmichael conjectured that there are no 1's in this sequence. - Jud McCranie, Oct 10 2000
Number of cyclotomic polynomials of degree n. - T. D. Noe, Aug 15 2003
Let v == 0 (mod 24), w = v + 24, and v < k < q < w, where k and q are integer. It seems that, for most values of v, there is no b such that b = a(k) + a(q) and b > a(v) + a(w). The first case where b > a(v) + a(w) occurs at v = 888: b = a(896) + a(900) = 15 + 4, b > a(888) + a(912), or 19 > 8 + 7. The first case where v < n < w and a(n) > a(v) + a(w) occurs at v = 2232: a(2240) > a(2232) + a(2256), or 27 > 7 + 8. - Sergey Pavlov, Feb 05 2017
One elementary result relating to phi(m) is that if m is odd, then phi(m)=phi(2m) because 1 and 2 both have phi value 1 and phi is multiplicative. - Roderick MacPhee, Jun 03 2017

References

  • Richard K. Guy, Unsolved Problems in Number Theory, 3rd Edition, Springer, 2004, Section B39, pp. 144-146.
  • Joe Roberts, Lure of The Integers, The Mathematical Association of America, 1992, entry 32, page 182.

Crossrefs

Cf. A000010, A002202, A032446 (bisection), A049283, A051894, A055506, A057635, A057826, A058277 (nonzero terms), A058341, A063439, A066412, A070243 (partial sums), A070633, A071386 (positions of odd terms), A071387, A071388 (positions of primes), A071389 (where prime(n) occurs for the first time), A082695, A097942 (positions of records), A097946, A120963, A134269, A219930, A280611, A280709, A280712, A296655 (positions of positive even terms), A305353, A305656, A319048, A322019.
For records see A131934.
Column 1 of array A320000.

Programs

  • GAP
    a := function(n)
    local S, T, R, max, i, k, r;
    S:=[];
    for i in DivisorsInt(n)+1 do
        if IsPrime(i)=true then
            S:=Concatenation(S,[i]);
        fi;
    od;
    T:=[];
    for k in [1..Size(S)] do
        T:=Concatenation(T,[S[k]/(S[k]-1)]);
    od;
    max := n*Product(T);
    R:=[];
    for r in [1..Int(max)] do
        if Phi(r)=n then
            R:=Concatenation(R,[r]);
        fi;
    od;
    return Size(R);
    end; # Miles Englezou, Oct 22 2024
  • Magma
    [#EulerPhiInverse(n): n in [1..100]]; // Marius A. Burtea, Sep 08 2019
    
  • Maple
    with(numtheory): A014197:=n-> nops(invphi(n)): seq(A014197(n), n=1..200);
  • Mathematica
    a[1] = 2; a[m_?OddQ] = 0; a[m_] := Module[{p, nmax, n, k}, p = Select[ Divisors[m]+1, PrimeQ]; nmax = m*Times @@ (p/(p - 1)); n = m; k = 0; While[n <= nmax, If[EulerPhi[n] == m, k++]; n++]; k]; Array[a, 92] (* Jean-François Alcover, Dec 09 2011, updated Apr 25 2016 *)
    With[{nn = 116}, Function[s, Function[t, Take[#, nn] &@ ReplacePart[t, Map[# -> Length@ Lookup[s, #] &, Keys@ s]]]@ ConstantArray[0, Max@ Keys@ s]]@ KeySort@ PositionIndex@ Array[EulerPhi, Floor[nn^(3/2)] + 10]] (* Michael De Vlieger, Jul 19 2017 *)
  • PARI
    A014197(n,m=1) = { n==1 && return(1+(m<2)); my(p,q); sumdiv(n, d, if( d>=m && isprime(d+1), sum( i=0,valuation(q=n\d,p=d+1), A014197(q\p^i,p))))} \\ M. F. Hasler, Oct 05 2009
    
  • PARI
    a(n) = invphiNum(n); \\ Amiram Eldar, Nov 15 2024 using Max Alekseyev's invphi.gp
    
  • Python
    from sympy import totient, divisors, isprime, prod
    def a(m):
        if m == 1: return 2
        if m % 2: return 0
        X = (x + 1 for x in divisors(m))
        nmax=m*prod(i/(i - 1) for i in X if isprime(i))
        n=m
        k=0
        while n<=nmax:
            if totient(n)==m:k+=1
            n+=1
        return k
    print([a(n) for n in range(1, 51)]) # Indranil Ghosh, Jul 18 2017, after Mathematica code
    

Formula

Dirichlet g.f.: Sum_{n>=1} a(n)*n^-s = zeta(s)*Product_(1+1/(p-1)^s-1/p^s). - Benoit Cloitre, Apr 12 2003
Limit_{n->infinity} (1/n) * Sum_{k=1..n} a(k) = zeta(2)*zeta(3)/zeta(6) = 1.94359643682075920505707036... (see A082695). - Benoit Cloitre, Apr 12 2003
From Christopher J. Smyth, Jan 08 2017: (Start)
Euler transform = Product_{n>=1} (1-x^n)^(-a(n)) = g.f. of A120963.
Product_{n>=1} (1+x^n)^a(n)
= Product_{n>=1} ((1-x^(2n))/(1-x^n))^a(n)
= Product_{n>=1} (1-x^n)^(-A280712(n))
= Euler transform of A280712 = g.f. of A280611.
(End)
a(A000010(n)) = A066412(n). - Antti Karttunen, Jul 18 2017
From Antti Karttunen, Dec 04 2018: (Start)
a(A000079(n)) = A058321(n).
a(A000142(n)) = A055506(n).
a(A017545(n)) = A063667(n).
a(n) = Sum_{d|n} A008683(n/d)*A070633(d).
a(n) = A056239(A322310(n)).
(End)

A008595 Multiples of 13.

Original entry on oeis.org

0, 13, 26, 39, 52, 65, 78, 91, 104, 117, 130, 143, 156, 169, 182, 195, 208, 221, 234, 247, 260, 273, 286, 299, 312, 325, 338, 351, 364, 377, 390, 403, 416, 429, 442, 455, 468, 481, 494, 507, 520, 533, 546, 559, 572, 585, 598, 611, 624, 637, 650, 663, 676
Offset: 0

Views

Author

Keywords

Comments

Complement of A113763. - Reinhard Zumkeller, Apr 26 2011

Crossrefs

Programs

Formula

(floor(a(n)/10) + 4*(a(n) mod 10)) == 0 modulo 13, see A076310. - Reinhard Zumkeller, Oct 06 2002
From Vincenzo Librandi, Dec 24 2010: (Start)
a(n) = 13*n.
a(n) = 2*a(n-1) - a(n-2).
G.f.: 13*x/(x-1)^2. (End)
From Elmo R. Oliveira, Apr 08 2025: (Start)
E.g.f.: 13*x*exp(x).
a(n) = A252994(n)/2. (End)

A017629 a(n) = 12*n + 9.

Original entry on oeis.org

9, 21, 33, 45, 57, 69, 81, 93, 105, 117, 129, 141, 153, 165, 177, 189, 201, 213, 225, 237, 249, 261, 273, 285, 297, 309, 321, 333, 345, 357, 369, 381, 393, 405, 417, 429, 441, 453, 465, 477, 489, 501, 513, 525, 537, 549, 561, 573, 585, 597, 609, 621, 633
Offset: 0

Views

Author

Keywords

Comments

Numbers k such that k mod 2 = (k+1) mod 3 = 1 and (k+2) mod 4 != 1. - Klaus Brockhaus, Jun 15 2004
For n > 3, the number of squares on the infinite 3-column chessboard at <= n knight moves from any fixed point. - Ralf Stephan, Sep 15 2004
A016946 is the subsequence of squares (for n = 3*k*(k+1) = A028896(k), then a(n) = (6k+3)^2 = A016946(k)). - Bernard Schott, Apr 05 2021

Crossrefs

Programs

Formula

a(n) = 6*(4*n+1) - a(n-1) (with a(0)=9). - Vincenzo Librandi, Dec 17 2010
A089911(2*a(n)) = 4. - Reinhard Zumkeller, Jul 05 2013
G.f.: (9 + 3*x)/(1 - x)^2. - Alejandro J. Becerra Jr., Jul 08 2020
Sum_{n>=0} (-1)^n/a(n) = (Pi + log(3-2*sqrt(2)))/(12*sqrt(2)). - Amiram Eldar, Dec 12 2021
E.g.f.: 3*exp(x)*(3 + 4*x). - Stefano Spezia, Feb 25 2023

A091999 Numbers that are congruent to {2, 10} mod 12.

Original entry on oeis.org

2, 10, 14, 22, 26, 34, 38, 46, 50, 58, 62, 70, 74, 82, 86, 94, 98, 106, 110, 118, 122, 130, 134, 142, 146, 154, 158, 166, 170, 178, 182, 190, 194, 202, 206, 214, 218, 226, 230, 238, 242, 250, 254, 262, 266, 274, 278, 286, 290, 298, 302, 310, 314, 322, 326, 334
Offset: 1

Views

Author

Ray Chandler, Feb 21 2004

Keywords

Comments

Numbers divisible by 2 but not by 3 or 4. - Robert Israel, Apr 24 2015
For n > 1, a(n) is representable as a sum of four but no fewer consecutive nonnegative integers, i.e., 10 = 1 + 2 + 3 + 4, 14 = 2 + 3 + 4 + 5, 22 = 4 + 5 + 6 + 7, etc. (see A138591). - Martin Renner, Mar 14 2016
Essentially the same as A063221. - Omar E. Pol, Aug 16 2023

Crossrefs

Second row of A092260.
Cf. A109761 (subsequence).

Programs

  • Haskell
    a091999 n = a091999_list !! (n-1)
    a091999_list = 2 : 10 : map (+ 12) a091999_list
    -- Reinhard Zumkeller, Jan 21 2013
    
  • Magma
    [6*n-3+(-1)^n : n in [1..100]]; // Wesley Ivan Hurt, Apr 23 2015
    
  • Maple
    A091999:=n->6*n-3+(-1)^n: seq(A091999(n), n=1..100); # Wesley Ivan Hurt, Apr 23 2015
  • Mathematica
    Flatten[#+{2,10}&/@(12*Range[0,30])] (* or *) LinearRecurrence[{1,1,-1},{2,10,14},60] (* Harvey P. Dale, Jun 24 2013 *)
  • PARI
    a(n) = 6*n - 3 + (-1)^n \\ David Lovler, Jul 16 2022

Formula

a(n) = 2*A007310(n).
a(n) = A186424(n) - A186424(n-2), for n > 1.
a(n) = 12*(n-1) - a(n-1), with a(1)=2. - Vincenzo Librandi, Nov 16 2010
G.f.: 2*x*(1+4*x+x^2) / ( (1+x)*(x-1)^2 ). - R. J. Mathar, Oct 08 2011
a(n) = a(n-1) + a(n-2) - a(n-3); a(1)=2, a(2)=10, a(3)=14. - Harvey P. Dale, Jun 24 2013
a(n) = 6*n - 3 + (-1)^n. - Wesley Ivan Hurt, Apr 23 2015
E.g.f.: 2 + (6*x - 2)*cosh(x) + 2*(3*x - 2)*sinh(x). - Stefano Spezia, May 09 2021
Sum_{n>=1} (-1)^(n+1)/a(n) = Pi/(4*sqrt(3)). - Amiram Eldar, Dec 13 2021
E.g.f.: 2 + (6*x - 3)*exp(x) + exp(-x). - David Lovler, Aug 08 2022
a(n) = A063221(n), n > 1. - Omar E. Pol, Aug 15 2023
From Amiram Eldar, Nov 24 2024: (Start)
Product_{n>=1} (1 - (-1)^n/a(n)) = sqrt(2) (A002193).
Product_{n>=1} (1 + (-1)^n/a(n)) = 2*sin(Pi/12) (A101263). (End)

A017569 a(n) = 12*n + 4.

Original entry on oeis.org

4, 16, 28, 40, 52, 64, 76, 88, 100, 112, 124, 136, 148, 160, 172, 184, 196, 208, 220, 232, 244, 256, 268, 280, 292, 304, 316, 328, 340, 352, 364, 376, 388, 400, 412, 424, 436, 448, 460, 472, 484, 496, 508, 520, 532, 544, 556, 568, 580, 592, 604, 616, 628
Offset: 0

Views

Author

Keywords

Comments

Apart from initial term(s), dimension of the space of weight 2n cusp forms for Gamma_0(46).
Number of 6 X n 0-1 matrices avoiding simultaneously the right angled numbered polyomino patterns (ranpp) (00;1), (01;0), (11;0) and (01;1). An occurrence of a ranpp (xy;z) in a matrix A=(a(i,j)) is a triple (a(i1,j1), a(i1,j2), a(i2,j1)) where i1A008574; m=3: A016933; m=4: A022144; m=5: A017293. - Sergey Kitaev, Nov 13 2004
Except for 4, exponents e such that x^e - x^2 + 1 is reducible.
If Y and Z are 2-blocks of a (3n+1)-set X then a(n-1) is the number of 3-subsets of X intersecting both Y and Z. - Milan Janjic, Oct 28 2007
Terms are perfect squares iff n is a generalized octagonal number (A001082), then n = k*(3*k-2) and a(n) = (2*(3*k-1))^2. - Bernard Schott, Feb 26 2023

Crossrefs

Programs

Formula

A089911(a(n)) = 3. - Reinhard Zumkeller, Jul 05 2013
Sum_{n>=0} (-1)^n/a(n) = sqrt(3)*Pi/36 + log(2)/12. - Amiram Eldar, Dec 12 2021
From Stefano Spezia, Feb 25 2023: (Start)
O.g.f.: 4*(1 + 2*x)/(1 - x)^2.
E.g.f.: 4*exp(x)*(1 + 3*x). (End)
From Elmo R. Oliveira, Apr 10 2025: (Start)
a(n) = 2*a(n-1) - a(n-2).
a(n) = 2*A016933(n) = 4*A016777(n) = A016777(4*n+1). (End)

A017641 a(n) = 12*n + 10.

Original entry on oeis.org

10, 22, 34, 46, 58, 70, 82, 94, 106, 118, 130, 142, 154, 166, 178, 190, 202, 214, 226, 238, 250, 262, 274, 286, 298, 310, 322, 334, 346, 358, 370, 382, 394, 406, 418, 430, 442, 454, 466, 478, 490, 502, 514, 526, 538, 550, 562, 574, 586, 598, 610, 622, 634
Offset: 0

Views

Author

Keywords

Comments

Exponents e such that x^e + x^2 - 1 is reducible.
If Y is a 4-subset of an (2n+1)-set X then, for n>=3, a(n-2) is the number of 3-subsets of X having at least two elements in common with Y. - Milan Janjic, Dec 16 2007

Crossrefs

Programs

Formula

A030132(a(n)) = 9. - Reinhard Zumkeller, Jul 04 2007
G.f.: 2*(5 + x)/(1 - x)^2. - Stefano Spezia, May 09 2021
Sum_{n>=0} (-1)^n/a(n) = Pi/12 - sqrt(3)*log(2 + sqrt(3))/12. - Amiram Eldar, Dec 12 2021
From Elmo R. Oliveira, Apr 04 2025: (Start)
E.g.f.: 2*exp(x)*(5 + 6*x).
a(n) = 2*A016969(n).
a(n) = 2*a(n-1) - a(n-2) for n >= 2. (End)

A017605 a(n) = 12*n + 7.

Original entry on oeis.org

7, 19, 31, 43, 55, 67, 79, 91, 103, 115, 127, 139, 151, 163, 175, 187, 199, 211, 223, 235, 247, 259, 271, 283, 295, 307, 319, 331, 343, 355, 367, 379, 391, 403, 415, 427, 439, 451, 463, 475, 487, 499, 511, 523, 535, 547, 559, 571, 583, 595, 607, 619, 631
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

Formula

a(n) = 2*(12*n+1) - a(n-1) = 2*a(n-1) - a(n-2) with a(0) = 7, a(1) = 19. - Vincenzo Librandi, Nov 19 2010
a(n) = (n+1)*A016921(n+1) - n*A016921(n). - Bruno Berselli, Jan 18 2013
a(n) = A003215(n+1) - 6*A000217(n-1). - Leo Tavares, Jul 25 2021
From Elmo R. Oliveira, Apr 02 2024: (Start)
G.f.: (7+5*x)/(1-x)^2.
E.g.f.: exp(x)*(7 + 12*x).
a(n) = A049453(n+1) - A049453(n) = A142241(n)/2. (End)

A017617 a(n) = 12*n + 8.

Original entry on oeis.org

8, 20, 32, 44, 56, 68, 80, 92, 104, 116, 128, 140, 152, 164, 176, 188, 200, 212, 224, 236, 248, 260, 272, 284, 296, 308, 320, 332, 344, 356, 368, 380, 392, 404, 416, 428, 440, 452, 464, 476, 488, 500, 512, 524, 536, 548, 560, 572, 584, 596, 608, 620, 632, 644, 656
Offset: 0

Views

Author

Keywords

Comments

Also the number of cube units that frame a cube of edge length n+1. - Peter M. Chema, Mar 27 2016

Examples

			For n=3; a(3)= 12*3 + 8 = 44.
Thus, there are 44 cube units that frame a cube of edge length 4. - _Peter M. Chema_, Mar 26 2016
		

Crossrefs

Programs

Formula

a(n) = 2*a(n-1) - a(n-2). - Vincenzo Librandi, Jun 08 2011
A089911(a(n)) = 9. - Reinhard Zumkeller, Jul 05 2013
G.f.: 12*x/(1-x)^2 + 8/(1-x) = 4*(2+x)/(1-x)^2. (see the PARI program). - Wolfdieter Lang, Oct 11 2021
Sum_{n>=0} (-1)^n/a(n) = sqrt(3)*Pi/36 - log(2)/12. - Amiram Eldar, Dec 12 2021
From Elmo R. Oliveira, Apr 04 2025: (Start)
E.g.f.: 4*exp(x)*(2 + 3*x).
a(n) = 4*A016789(n) = 2*A016957(n) = A016933(2*n+1). (End)

A017557 a(n) = 12*n + 3.

Original entry on oeis.org

3, 15, 27, 39, 51, 63, 75, 87, 99, 111, 123, 135, 147, 159, 171, 183, 195, 207, 219, 231, 243, 255, 267, 279, 291, 303, 315, 327, 339, 351, 363, 375, 387, 399, 411, 423, 435, 447, 459, 471, 483, 495, 507, 519, 531, 543, 555, 567, 579, 591, 603, 615, 627, 639
Offset: 0

Views

Author

Keywords

Comments

Apart from initial term(s), dimension of the space of weight 2n cusp forms for Gamma_0( 44 ).

Crossrefs

Programs

Formula

a(n) = 2*a(n-1) - a(n-2). - Vincenzo Librandi, Jun 07 2011
A089911(2*a(n)) = 8. - Reinhard Zumkeller, Jul 05 2013
From G. C. Greubel, Sep 18 2019: (Start)
G.f.: 3*(1+3*x)/(1-x)^2.
E.g.f.: 3*(1+4*x)*exp(x). (End)
Sum_{n>=0} (-1)^n/a(n) = (Pi + 2*log(sqrt(2)+1))/(12*sqrt(2)). - Amiram Eldar, Dec 12 2021

A017653 a(n) = 12*n + 11.

Original entry on oeis.org

11, 23, 35, 47, 59, 71, 83, 95, 107, 119, 131, 143, 155, 167, 179, 191, 203, 215, 227, 239, 251, 263, 275, 287, 299, 311, 323, 335, 347, 359, 371, 383, 395, 407, 419, 431, 443, 455, 467, 479, 491, 503, 515, 527, 539, 551, 563, 575, 587, 599, 611, 623, 635
Offset: 0

Views

Author

Keywords

Comments

Or, with a different offset, 12*n - 1. In any case, numbers congruent to -1 (mod 12). - Alonso del Arte, May 29 2011
Numbers congruent to 2 (mod 3) and 3 (mod 4). - Bruno Berselli, Jul 06 2017

Crossrefs

Programs

Formula

a(n) = 2*a(n-1) - a(n-2). - Vincenzo Librandi, Jun 08 2011
G.f.: (11+x)/(1-x)^2. - Colin Barker, Feb 19 2012
A089911(2*a(n)) = 11. - Reinhard Zumkeller, Jul 05 2013
a(n) = 2*A003215(n+1) - 1 - 2*A003215(n). See Twin Hexagonal Frames illustration. - Leo Tavares, Aug 19 2021
From Elmo R. Oliveira, Apr 12 2025: (Start)
E.g.f.: exp(x)*(11 + 12*x).
a(n) = A016969(2*n+1). (End)
Showing 1-10 of 17 results. Next