A213891 Fixed points of the sequence A262212 defined by the minimum number of 2's in the relation n*[n,2,2,...,2,n] = [x,...,x] between simple continued fractions.
3, 11, 19, 43, 67, 83, 107, 131, 139, 163, 211, 283, 307, 331, 347, 467, 491, 499, 523, 547, 563, 571, 587, 619, 659, 691, 739, 787, 811, 859, 883, 907, 947, 971, 1019, 1051, 1123, 1163, 1171, 1283, 1291, 1307
Offset: 1
Keywords
Examples
The basic sequence h(n) (= A262212) is for n = 3,4,5,..: 3*[3, 2, 2, 2, 3] = [10,4,10], h(3) = 3: the first fixed point a(1) = 3. 4*[4, 2, 2, 2, 4] = [17, 1, 1, 1, 17], h(4) = 3; 5*[5, 2, 2, 5] = [27, 27], h(5) = 2; 6*[6, 2, 2, 2, 6] = [38, 2, 38], h(6) = 3; (...) 11*[11, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 11] = [125, 1, 1, 3, 1, 14, 1, 3, 1, 1, 125] , h(11) = 11: this is the next fixed point after 3, so a(2)=11.
Crossrefs
Programs
-
Maple
simpcf := proc(L) if nops(L) = 1 then op(1,L) ; else op(1,L)+1/procname([op(2..nops(L),L)]) ; end if; end proc: A213891aux := proc(n) local h,ins,c ; for ins from 1 do c := [n,seq(2,i=1..ins),n] ; h := numtheory[cfrac](n*simpcf(c),quotients) ; if op(1,h) = op(-1,h) then return ins; end if; end do: end proc: A213891 := proc(n) if n = 1 then 3; else for a from procname(n-1)+1 do if A213891aux(a) = a then return a; end if; end do: end if; end proc: # R. J. Mathar, Jul 06 2012
-
Mathematica
f[m_, n_] := Block[{c, k = 1}, c[x_, y_] := ContinuedFraction[x FromContinuedFraction[Join[{x}, Table[m, {y}], {x}]]]; While[First@ c[n, k] != Last@ c[n, k], k++]; k]; Select[Range[2, 1000], f[2, #] == # &] (* Michael De Vlieger, Sep 16 2015 *)
-
PARI
{a(n) = local(t, m=1); if( n<2, 0, while( 1, t = contfracpnqn( concat([n, vector(m,i,2), n])); t = contfrac(n*t[1,1]/t[2,1]); if(t[1]
-
PARI
forprime(p=2,999, A262212(p)==p&&print1(p",")) \\ M. F. Hasler, Sep 30 2015
Extensions
Edited by R. J. Mathar and T. D. Noe, Jul 06 2012
Edited by M. F. Hasler, Sep 30 2015
Comments