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 14 results. Next

A190815 A bisection of A049690.

Original entry on oeis.org

0, 3, 9, 17, 31, 45, 63, 87, 111, 139, 173, 205, 243, 287, 329, 373, 435, 487, 535, 607, 663, 727, 809, 877, 955, 1037, 1117, 1205, 1293, 1385, 1475, 1595, 1695, 1783, 1913, 2005, 2123, 2267, 2379, 2487, 2629, 2763, 2893, 3041, 3177, 3313, 3473, 3625, 3761
Offset: 1

Views

Author

N. J. A. Sloane, May 20 2011

Keywords

Crossrefs

Programs

  • Magma
    [n eq 1 select 0 else (&+[EulerPhi(2*j): j in [1..2*(n-1)]]) : n in [1..60] ]; // G. C. Greubel, Dec 03 2023
    
  • Maple
    A190815 := proc(n) option remember: if(n=1)then return 0:fi: return procname(n-1)+numtheory[phi](4*n-6)+numtheory[phi](4*n-4): end: seq(A190815(n),n=1..49); # Nathaniel Johnston, May 24 2011
  • Mathematica
    a[n_] := Sum[EulerPhi[2k], {k, 1, 2n-2}];
    Table[a[n], {n, 1, 49}] (* Jean-François Alcover, Apr 16 2023 *)
  • SageMath
    [sum(euler_phi(2*j) for j in range(1,2*n-1)) for n in range(1,61)] # G. C. Greubel, Dec 03 2023

Extensions

More terms from Nathaniel Johnston, May 24 2011

A061571 Duplicate of A049690.

Original entry on oeis.org

0, 1, 3, 5, 9, 13, 17, 23, 31, 37, 45, 55, 63, 75, 87, 95, 111, 127, 139, 157, 173, 185, 205
Offset: 0

Views

Author

Keywords

A068773 Alternating sum phi(1) - phi(2) + phi(3) - phi(4) + ... + ((-1)^(n+1))*phi(n).

Original entry on oeis.org

1, 0, 2, 0, 4, 2, 8, 4, 10, 6, 16, 12, 24, 18, 26, 18, 34, 28, 46, 38, 50, 40, 62, 54, 74, 62, 80, 68, 96, 88, 118, 102, 122, 106, 130, 118, 154, 136, 160, 144, 184, 172, 214, 194, 218, 196, 242, 226, 268, 248, 280, 256, 308, 290, 330, 306, 342, 314, 372, 356
Offset: 1

Views

Author

Klaus Brockhaus, Feb 28 2002

Keywords

Examples

			a(3) = phi(1) - phi(2) + phi(3) = 1 - 1 + 2 = 2.
		

Crossrefs

Programs

  • Maple
    with(numtheory): seq(add((-1)^(k+1)*phi(k),k=1..n), n=1..80); # Ridouane Oudra, Mar 22 2024
  • Mathematica
    Accumulate[Array[(-1)^(# + 1) * EulerPhi[#] &, 100]] (* Amiram Eldar, Oct 14 2022 *)
  • PARI
    a068773(m)=local(s,n); s=0; for(n=1,m, if(n%2==0,s=s-eulerphi(n),s=s+eulerphi(n)); print1(s,","))
    
  • Python
    # uses code from A002088 and A049690
    def A068773(n): return A002088(n)-(A049690(n>>1)<<1) # Chai Wah Wu, Aug 04 2024

Formula

a(n) = Sum_{k=1..n} (-1)^(k+1)*phi(k).
a(n) = n^2/Pi^2 + O(n * log(n)^(2/3) * log(log(n))^(4/3)) (Tóth, 2017). - Amiram Eldar, Oct 14 2022
a(n) = 3*A002088(n) - 2*A049690(n). - Ridouane Oudra, Mar 22 2024
a(n) = A002088(n) - 2*A049690(floor(n/2)). - Chai Wah Wu, Aug 04 2024

A372619 Square array T(n,k), n >= 1, k >= 1, read by antidiagonals downwards, where T(n,k) = 1/(phi(k)) * Sum_{j=1..n} phi(k*j).

Original entry on oeis.org

1, 1, 2, 1, 3, 4, 1, 2, 5, 6, 1, 3, 5, 9, 10, 1, 2, 5, 7, 13, 12, 1, 3, 4, 9, 11, 17, 18, 1, 2, 6, 6, 13, 14, 23, 22, 1, 3, 4, 10, 11, 17, 20, 31, 28, 1, 2, 5, 6, 14, 13, 23, 24, 37, 32, 1, 3, 5, 9, 10, 20, 19, 31, 33, 45, 42, 1, 2, 5, 7, 13, 12, 26, 23, 37, 37, 55, 46
Offset: 1

Views

Author

Seiichi Manyama, May 07 2024

Keywords

Examples

			Square array T(n,k) begins:
   1,  1,  1,  1,  1,  1,  1,  1,  1,  1, ...
   2,  3,  2,  3,  2,  3,  2,  3,  2,  3, ...
   4,  5,  5,  5,  4,  6,  4,  5,  5,  5, ...
   6,  9,  7,  9,  6, 10,  6,  9,  7,  9, ...
  10, 13, 11, 13, 11, 14, 10, 13, 11, 14, ...
  12, 17, 14, 17, 13, 20, 12, 17, 14, 18, ...
  18, 23, 20, 23, 19, 26, 19, 23, 20, 24, ...
		

Crossrefs

Main diagonal gives A070639.

Programs

  • Mathematica
    T[n_, k_] := Sum[EulerPhi[k*j], {j, 1, n}] / EulerPhi[k]; Table[T[k, n-k+1], {n, 1, 12}, {k, 1, n}] // Flatten (* Amiram Eldar, May 09 2024 *)
  • PARI
    T(n, k) = sum(j=1, n, eulerphi(k*j))/eulerphi(k);

Formula

T(n,k) ~ (3/Pi^2) * c(k) * n^2, where c(k) = A078615(k)/A322360(k) is the multiplicative function defined by c(p^e) = p^2/(p^2-1). - Amiram Eldar, May 09 2024

A099957 a(n) = Sum_{k=0..n-1} phi(2k+1).

Original entry on oeis.org

1, 3, 7, 13, 19, 29, 41, 49, 65, 83, 95, 117, 137, 155, 183, 213, 233, 257, 293, 317, 357, 399, 423, 469, 511, 543, 595, 635, 671, 729, 789, 825, 873, 939, 983, 1053, 1125, 1165, 1225, 1303, 1357, 1439, 1503, 1559, 1647, 1719, 1779, 1851, 1947
Offset: 1

Views

Author

Hugo Pfoertner, Nov 13 2004

Keywords

Comments

The n-th term is the number of notes of the (2n-1)-limit tonality diamond. This is a term from music theory and means the scale consisting of the rational numbers r, 1 <= r < 2, such that the odd part of both the numerator and the denominator of r, when reduced to lowest terms, is less than or equal to the fixed odd number 2n-1. - Gene Ward Smith, Mar 27 2006
(1/4)*Number of distinct angular positions under which an observer positioned at the center of a square of a square lattice can see the (2n) X (2n) points symmetrically surrounding his position.
(1/8)*number of distinct angular positions under which an observer positioned at a lattice point of a square lattice can see the (2n+1)X(2n+1) points symmetrically surrounding his position gives A002088.
(1/2)*number of distinct angular positions under which an observer positioned at the center of an edge of a square lattice can see the (2n)X(2n-1) points symmetrically surrounding his position gives A099958.

Crossrefs

Bisection of A274401.
Partial sums of A037225.

Programs

  • Mathematica
    Accumulate[EulerPhi[2*Range[0,50]+1]] (* Harvey P. Dale, Aug 20 2021 *)
  • PARI
    apply( {A099957(n)=sum(k=1,n, eulerphi(2*k-1))}, [1..55]) \\ M. F. Hasler, Apr 03 2023

Formula

a(n+1) - a(n) = phi(2n+1) (A037225).
a(n) = (8/Pi^2)*n^2 + O(n^(3/2+eps)) (Lemma 1 in Lv Chuan, 2004). - Amiram Eldar, Aug 02 2022, corrected by M. F. Hasler, Mar 26 2023
a(n) = A002088(2*n-1) - A049690(n-1). - Chai Wah Wu, Aug 04 2024

A372606 Square array T(n,k), n >= 1, k >= 1, read by antidiagonals downwards, where T(n,k) = Sum_{j=1..n} phi(k*j).

Original entry on oeis.org

1, 1, 2, 2, 3, 4, 2, 4, 5, 6, 4, 6, 10, 9, 10, 2, 8, 10, 14, 13, 12, 6, 6, 16, 18, 22, 17, 18, 4, 12, 12, 24, 26, 28, 23, 22, 6, 12, 24, 20, 44, 34, 40, 31, 28, 4, 12, 20, 36, 28, 52, 46, 48, 37, 32, 10, 12, 30, 36, 60, 40, 76, 62, 66, 45, 42, 4, 20, 20, 42, 52, 72, 52, 92, 74, 74, 55, 46
Offset: 1

Views

Author

Seiichi Manyama, May 07 2024

Keywords

Examples

			Square array T(n,k) begins:
   1,  1,  2,  2,  4,  2,   6, ...
   2,  3,  4,  6,  8,  6,  12, ...
   4,  5, 10, 10, 16, 12,  24, ...
   6,  9, 14, 18, 24, 20,  36, ...
  10, 13, 22, 26, 44, 28,  60, ...
  12, 17, 28, 34, 52, 40,  72, ...
  18, 23, 40, 46, 76, 52, 114, ...
		

Crossrefs

Columns k=1..2 give: A002088, A049690.
Main diagonal gives A372608.

Programs

  • Mathematica
    T[n_, k_] := Sum[EulerPhi[k*j], {j, 1, n}]; Table[T[k, n-k+1], {n, 1, 12}, {k, 1, n}] // Flatten (* Amiram Eldar, May 10 2024 *)
  • PARI
    T(n, k) = sum(j=1, n, eulerphi(k*j));

Formula

T(n,k) ~ (3/Pi^2) * c(k) * n^2, where c(k) = k * A007947(k)/A048250(k) = k * A332881(k) / A332880(k) is the multiplicative function defined by c(p^e) = p^(e+1)/(p+1). - Amiram Eldar, May 10 2024

A099958 (1/2)*number of distinct angular positions under which an observer positioned at the center of an edge of a square lattice can see the (2n)X(2n-1) points symmetrically surrounding his position.

Original entry on oeis.org

1, 5, 13, 23, 37, 55, 75, 95, 127, 157, 185, 227, 263, 305, 357, 403, 455, 511, 571, 631, 703, 769, 833, 923, 997, 1069, 1169, 1245, 1329, 1443, 1535, 1631, 1743, 1849, 1957, 2075, 2195, 2307, 2439, 2565, 2683, 2845, 2957, 3097, 3265, 3385
Offset: 1

Views

Author

Hugo Pfoertner, Nov 13 2004

Keywords

Crossrefs

See A099957 for further information. Cf. A049687, A049690, A190815.

Formula

This is a bisection of A049690, that is, a(n) = Sum[k=1..2n+1, phi(2k)]. - Ralf Stephan, Nov 13 2004.

A106481 An Euler phi transform of 1/(1 - x^2).

Original entry on oeis.org

0, 1, 1, 3, 3, 7, 5, 13, 9, 19, 13, 29, 17, 41, 23, 49, 31, 65, 37, 83, 45, 95, 55, 117, 63, 137, 75, 155, 87, 183, 95, 213, 111, 233, 127, 257, 139, 293, 157, 317, 173, 357, 185, 399, 205, 423, 227, 469, 243, 511, 263, 543, 287, 595, 305, 635, 329, 671, 357, 729
Offset: 0

Views

Author

Paul Barry, May 03 2005

Keywords

Crossrefs

Programs

Formula

a(n) = Sum_{k=0..n} phi(n-k+1)*(k mod 2).
Euler transform of period 7 sequence [3,-2,-1,-1,-2,3,0,...].
a(2n) = A049690(n).
a(2n+1) = A099957(n).

A274401 Number of balanced linear 4-partitions of the n X n grid.

Original entry on oeis.org

0, 1, 8, 3, 16, 7, 32, 13, 48, 19, 80, 29, 96, 41, 144, 49, 176, 65, 224, 83, 256, 95, 336, 117, 368, 137, 464, 155, 512, 183, 576, 213, 640, 233, 768, 257, 816, 293, 960, 317, 1024, 357, 1120, 399, 1200, 423, 1376, 469, 1440
Offset: 1

Views

Author

Max Alekseyev, Jun 20 2016

Keywords

Crossrefs

Programs

Formula

For odd n, a(n) = 8 * A002088((n-1)/2).
For even n, a(n) = A099957(n/2).

A083239 First order recursion: a(0) = 1; a(n) = phi(n) - a(n-1) = A000010(n) - a(n-1).

Original entry on oeis.org

1, 0, 1, 1, 1, 3, -1, 7, -3, 9, -5, 15, -11, 23, -17, 25, -17, 33, -27, 45, -37, 49, -39, 61, -53, 73, -61, 79, -67, 95, -87, 117, -101, 121, -105, 129, -117, 153, -135, 159, -143, 183, -171, 213, -193, 217, -195, 241, -225, 267, -247, 279, -255, 307, -289, 329, -305, 341, -313, 371, -355, 415, -385, 421, -389, 437, -417
Offset: 0

Views

Author

Labos Elemer, Apr 23 2003

Keywords

Comments

Provides interesting decomposition: phi(n) = u+w, where u and w consecutive terms of this sequence. Depends also on initial value.

Crossrefs

Programs

  • Maple
    A083239 := proc(n)
        option remember ;
        if n = 0 then
            1 ;
        else
            numtheory[phi](n)-procname(n-1) ;
        end if;
    end proc:
    seq(A083239(n),n=0..100) ; # R. J. Mathar, Jun 20 2021
  • Mathematica
    a[n_] := a[n] = EulerPhi[n] -a[n-1]; a[0] = 1; Table[a[n], {n, 0, 100}]
  • Python
    # uses programs from A002088 and A049690
    def A083239(n): return A002088(n)-(A049690(n>>1)<<1)-1 if n&1 else 1+(A049690(n>>1)<<1)-A002088(n) # Chai Wah Wu, Aug 04 2024

Formula

a(n) + a(n-1) = A000010(n).
a(n) = (-1)^n * (1 - A068773(n)) for n >= 1. - Amiram Eldar, Mar 05 2024

Extensions

a(0)=1 prepended by R. J. Mathar, Jun 20 2021
Showing 1-10 of 14 results. Next