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: Peter H van der Kamp

Peter H van der Kamp's wiki page.

Peter H van der Kamp has authored 2 sequences.

A227507 Table of p(a,n) read by antidiagonals, where p(a,n) = Sum_{k=1..n} gcd(k,n) exp(2 Pi i k a / n) is the Fourier transform of the greatest common divisor.

Original entry on oeis.org

1, 3, 1, 5, 1, 1, 8, 2, 3, 1, 9, 2, 2, 1, 1, 15, 4, 4, 5, 3, 1, 13, 2, 4, 2, 2, 1, 1, 20, 6, 6, 4, 8, 2, 3, 1, 21, 4, 6, 5, 4, 2, 5, 1, 1, 27, 6, 8, 6, 6, 9, 4, 2, 3, 1, 21, 4, 6, 4, 6, 2, 4, 2, 2, 1, 1, 40, 10, 12, 12, 12, 6, 15, 4, 8, 5, 3, 1, 25, 4, 10, 4, 6, 4, 6, 2, 4, 2, 2, 1, 1, 39, 12, 8, 10, 12, 6
Offset: 1

Author

Peter H van der Kamp, Jul 13 2013

Keywords

Comments

p(a,n) gives the number of pairs (i,j) of congruence classes modulo n, such that i*j = a mod n.
p(a,n) is a multiplicative function of n.

Examples

			1, 3, 5, 8, 9, 15, 13, 20, 21, 27
1, 1, 2, 2, 4, 2, 6, 4, 6, 4
1, 3, 2, 4, 4, 6, 6, 8, 6, 12
1, 1, 5, 2, 4, 5, 6, 4, 12, 4
1, 3, 2, 8, 4, 6, 6, 12, 6, 12
1, 1, 2, 2, 9, 2, 6, 4, 6, 9
The array G_d(n) of Abel et al. (with A018804 on the diagonal) starts as follows:
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ,...
1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3,...
2, 2, 5, 2, 2, 5, 2, 2, 5, 2, 2, 5, 2, 2, 5, 2, 2, 5, 2, 2,...
2, 4, 2, 8, 2, 4, 2, 8, 2, 4, 2, 8, 2, 4, 2, 8, 2, 4, 2, 8,...
4, 4, 4, 4, 9, 4, 4, 4, 4, 9, 4, 4, 4, 4, 9, 4, 4, 4, 4, 9,...
2, 6, 5, 6, 2,15, 2, 6, 5, 6, 2,15, 2, 6, 5, 6, 2,15, 2, 6,...
6, 6, 6, 6, 6, 6,13, 6, 6, 6, 6, 6, 6,13, 6, 6, 6, 6, 6, 6,...
4, 8, 4,12, 4, 8, 4,20, 4, 8, 4,12, 4, 8, 4,20, 4, 8, 4,12,..
6, 6,12, 6, 6,12, 6, 6,21, 6, 6,12, 6, 6,12, 6, 6,21, 6, 6,...
4,12, 4,12, 9,12, 4,12, 4,27, 4,12, 4,12, 9,12, 4,12, 4,27,...
10,10,10,10,10,10,10,10,10,10,21,10,10,10,10,10,10,10,10,10,...
4, 8,10,16, 4,20, 4,16,10, 8, 4,40, 4, 8,10,16, 4,20, 4,16,...
12,12,12,12,12,12,12,12,12,12,12,12,25,12,12,12,12,12,12,12,...
... - _R. J. Mathar_, Jan 21 2018
		

Programs

  • Maple
    p:=(a,n)->add(d*phi(n/d),d in divisors(gcd(a,n))):
    seq(seq(p(a,n-a),a=0..n-1),n=1..10);

Formula

The function can be written as a generalized Ramanujan sum: p(a,n) = Sum_{d|gcd(a,n)} d phi(n/d), where phi(n) denotes the totient function.
The rows of its table are equal to two of the diagonals: p(a,n) = p(n-a,n) = p(n+a,n).
p(0,n) = A018804(n), p(1,n) = A000010(n).
f(n) = Sum_{k=1..n} p(r,k)/k = Sum_{k=1..n} c_k(r)/k * floor(n/k), where c_k(r) denotes Ramanujan's sum (A054533(r)).

A140827 Interleave denominators and numerators of convergents to sqrt(3).

Original entry on oeis.org

1, 1, 2, 3, 4, 7, 11, 15, 26, 41, 56, 97, 153, 209, 362, 571, 780, 1351, 2131, 2911, 5042, 7953, 10864, 18817, 29681, 40545, 70226, 110771, 151316, 262087, 413403, 564719, 978122, 1542841, 2107560, 3650401, 5757961, 7865521, 13623482, 21489003, 29354524, 50843527, 80198051, 109552575
Offset: 0

Author

Peter H van der Kamp, Jul 18 2008, Jul 22 2008

Keywords

Comments

Coefficients of (1+r)^m modulo r^4-r^2+1.
The first few principal and intermediate convergents to 3^(1/2) are 1/1, 2/1, 3/2, 5/3, 7/4, 12/7; essentially, numerators=A143642 and denominators=A140827. - Clark Kimberling, Aug 27 2008
From Michel Dekking, Mar 11 2020: (Start)
This sequence can be seen as a generalization of the Fibonacci numbers A000045. The Zeckendorf expansion of a natural number uses the Fibonacci numbers as constituents. The Zeckendorf expansion is called a 2-bin decomposition in the paper by Demontigny et al.
The numbers a(n) are the constituents of the 3-bin decomposition of a natural number. See Example 4.2 and Proposition 4.3 in the Demontigny et al. paper.
Any natural number N can be uniquely expanded as
N = Sum_{i=0..k} d(i)*a(i)
under the requirement d(i)d(i+1) = 0, and d(3i)d(3i+2) = 0 for all i.
Here k is the largest integer such that a(k) < N+1.
(End)

Examples

			(1+r)^(2+12*q)=(-1)^q*(a(1+18*q)*(1+r^2)+a(2+18*q)*r).
Here we write N = [d(k)d(k-1)...d(0)] for the 3-bin expansion of N.
0=[0], 1 =[1], 2=[10], 3=[100], 4=[1000], 5=[1001], 6=[1010], 7=[10000], 8=[10001], 9=[10010], 10=[10100], 11=[100000]. - _Michel Dekking_, Mar 11 2020
		

References

  • Serge Lang, Introduction to Diophantine Approximations, Addison-Wesley, New York, 1966.

Crossrefs

Programs

  • Maple
    N:=100: a[0]:=1: a[1]:=1: for i from 2 to N do if i mod 3 = 1 then a[i]:=a[i-1]+a[i-3] else a[i]:=a[i-1]+a[i-2] fi od:
  • Mathematica
    idnc[n_]:=Module[{cvrgts=Convergents[Sqrt[3],n],num,den},num=Take[ Numerator[ cvrgts],{2,-1,2}];den=Denominator[cvrgts]; Riffle[den, num,3]]; idnc[30] (* Harvey P. Dale, Mar 17 2012 *)

Formula

a(n) = 4*a(n-3) - a(n-6).
G.f.: ( 1+x+2*x^2-x^3-x^5 ) / ( 1-4*x^3+x^6 ).
a(n) = a(n-1)+a(n-3) if 3 |(n-1), else a(n)=a(n-1)+a(n-2), with n>1.
a(3*n-1) = A001075(n); a(3*n) = A001835(n-1); a(3*n+1) = A001353(n+1).
a(n)^2 = 1+3*a(n-1)^2 if n==2 (mod 3).