login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A165569 The indexing sequence for successively better golden semiprimes. 4
1, 2, 4, 8, 9, 10, 25, 71, 103, 115, 157, 231, 329, 1783, 1835, 4476, 5128, 12462, 16274, 25035, 42174, 72589, 85968, 147666, 613726, 1088825, 1112415, 3125316, 3929736, 5742036, 7639447, 25716100, 32780150, 48132247, 76049401, 100464259, 108803364, 186018939 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

LINKS

Amiram Eldar, Table of n, a(n) for n = 1..48

FORMULA

a(1)=1, and for n>1, a(n) = first such i>a(n-1) that abs(phi - A108539(i)/A000040(i)) < abs(phi - A108539(a(n-1))/A000040(a(n-1))), where phi = (1+sqrt(5))/2 (Golden ratio).

MATHEMATICA

f[p_] := Module[{x = GoldenRatio * p, p1, p2}, p1 = NextPrime[x, -1]; p2 = NextPrime[p1]; If[p2 - x > x - p1, p1, p2]]; seq={}; k=0; dm = 1; p1 = 1; Do[p1 = NextPrime[p1]; k++; p2 = f[p1]; d = Abs[p2/p1 - GoldenRatio]; If[d < dm, dm = d; AppendTo[seq, k]], {10^4}]; seq (* Amiram Eldar, Nov 28 2019 *)

PROG

(MIT Scheme:)

(define (A165569 n) (if (= 1 n) 1 (let* ((i (A165569 (-1+ n))) (champion (abs (- *phi* (/ (A108539 i) (A000040 i)))))) (let loop ((i (1+ i))) (cond ((< (abs (- *phi* (/ (A108539 i) (A000040 i)))) champion) i) (else (loop (1+ i))))))))

(define *phi* (/ (1+ (sqrt 5)) 2))

CROSSREFS

The corresponding semiprimes are given by A165570(n) = A165571(n)*A165572(n).

Cf. A108539.

Sequence in context: A196730 A325942 A325944 * A136803 A035268 A035241

Adjacent sequences:  A165566 A165567 A165568 * A165570 A165571 A165572

KEYWORD

nonn

AUTHOR

Antti Karttunen, Sep 22 2009

EXTENSIONS

a(16)-a(38) from Amiram Eldar, Nov 28 2019

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 29 01:03 EDT 2021. Contains 346340 sequences. (Running on oeis4.)