A023022 Number of partitions of n into two relatively prime parts. After initial term, this is the "half-totient" function phi(n)/2 (A000010(n)/2).
1, 1, 1, 2, 1, 3, 2, 3, 2, 5, 2, 6, 3, 4, 4, 8, 3, 9, 4, 6, 5, 11, 4, 10, 6, 9, 6, 14, 4, 15, 8, 10, 8, 12, 6, 18, 9, 12, 8, 20, 6, 21, 10, 12, 11, 23, 8, 21, 10, 16, 12, 26, 9, 20, 12, 18, 14, 29, 8, 30, 15, 18, 16, 24, 10, 33, 16, 22, 12, 35, 12, 36, 18, 20, 18, 30, 12, 39, 16, 27, 20, 41, 12
Offset: 2
Examples
a(15)=4 because there are 4 partitions of 15 into two parts that are relatively prime: 14 + 1, 13 + 2, 11 + 4, 8 + 7. - _Geoffrey Critzer_, Jan 25 2015 The smallest nonnegative reduced residue system mod*(n) for n = 1 is {0}, hence a(1) = 1; for n = 9 it is {1, 2, 4}, because 5 == 4 (mod* 9) since -5 == 4 (mod 9), 7 == 2 (mod* 9) and 8 == 1 (mod* 9). Hence a(9) = phi(9)/2 = 3. See the comment on Brändli and Beyne above. - _Wolfdieter Lang_, Apr 22 2020
References
- G. Pólya and G. Szegő, Problems and Theorems in Analysis I (Springer 1924, reprinted 1972), Part Eight, Chap. 1, Sect. 6, Problems 60&61.
- N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
Links
- T. D. Noe, Table of n, a(n) for n = 2..10000
- Gerold Brändli and Tim Beyne, Modified Congruence Modulo n with Half the Amount of Residues, arXiv:1504.02757 [math.NT], 2016.
- K. S. Brown, The Half-Totient Tree
- Tianxin Cai, Zhongyan Shen, and Mengjun Hu, On the Parity of the Generalized Euler Function, Advances in Mathematics (China), 2013, 42(4): 505-510.
- Daniele A. Gewurz and Francesca Merola, Sequences realized as Parker vectors of oligomorphic permutation groups, J. Integer Seqs., Vol. 6, 2003.
- Sameen Ahmed Khan, Trigonometric Ratios Using Algebraic Methods, Mathematics and Statistics (2021) Vol. 9, No. 6, 899-907.
- Wolfdieter Lang, On the Equivalence of Three Complete Cyclic Systems of Integers, arXiv:2008.04300 [math.NT], 2020.
- Jorma K. Merikoski, Pentti Haukkanen, and Timo Tossavainen, The congruence x^n = -a^n (mod m): Solvability and related OEIS sequences, Notes. Num. Theor. Disc. Math. (2024) Vol. 30, No. 3, 516-529. See p. 518.
- N. J. A. Sloane, Families of Essentially Identical Sequences, Mar 24 2021 (Includes this sequence)
- Pinthira Tangsupphathawat, Takao Komatsu, and Vichian Laohakosol, Minimal Polynomials of Algebraic Cosine Values, II, J. Int. Seq., Vol. 21 (2018), Article 18.9.5.
- Eric Weisstein's World of Mathematics, Polygon Triangle Picking
- Eric Weisstein's World of Mathematics, Trigonometry Angles
- Canze Zhu and Qunying Liao, A recursion formula for the generalized Euler function phi_e(n), arXiv:2105.10870 [math.NT], 2021.
Crossrefs
Programs
-
Haskell
a023022 n = length [(u, v) | u <- [1 .. div n 2], let v = n - u, gcd u v == 1] -- Reinhard Zumkeller, Jul 30 2014
-
Magma
[1] cat [EulerPhi(n)/ 2: n in [3..100]]; // Vincenzo Librandi, Aug 19 2018
-
Maple
A023022 := proc(n) if n =2 then 1; else numtheory[phi](n)/2 ; end if; end proc: seq(A023022(n),n=2..60) ; # R. J. Mathar, Sep 19 2017
-
Mathematica
Join[{1}, Table[EulerPhi[n]/2, {n, 3, 100}]] (* adapted by Vincenzo Librandi, Aug 19 2018 *)
-
PARI
a(n)=if(n<=2,1,eulerphi(n)/2); /* for printing minimal polynomials of cos(2*Pi/n) */ default(realprecision,110); for(n=1,33,print(n,": ",algdep(cos(2*Pi/n),a(n))));
-
Python
from sympy.ntheory import totient def a(n): return 1 if n<3 else totient(n)/2 # Indranil Ghosh, Mar 30 2017
Formula
a(n) = phi(n)/2 for n >= 3.
a(n) = (1/n)*Sum_{k=1..n-1, gcd(n, k)=1} k = A023896(n)/n for n>2. - Reinhard Zumkeller, Aug 20 2005
G.f.: x*(x - 1)/2 + (1/2)*Sum_{k>=1} mu(k)*x^k/(1 - x^k)^2. - Ilya Gutkovskiy, Apr 13 2017
a(n) = Sum_{d|n} moebius(n/d)*floor(d/2). - Michel Marcus, May 25 2021
Extensions
This was in the 1973 "Handbook", but then was dropped from the database. Resubmitted by David W. Wilson
Entry revised by N. J. A. Sloane, Jun 10 2012
Polynomials edited with the consent of Artur Jasinski by Wolfdieter Lang, Jan 08 2011
Name clarified by Geoffrey Critzer, Jan 25 2015
Comments