Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A088028
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A088028 Smallest k such that k^2-1 is a squarefree number with n prime divisors. a(n) = A088027(n)^(1/2). +0
2
2, 4, 14, 34, 254, 664, 5116, 18446, 121694, 887314, 7496644, 63124214, 684394346, 3086525014, 25689944554, 453164666954 (list; graph; listen)
OFFSET

1,1

EXAMPLE

a(4)^2 = 1156 = 34^2 = 3*5*7*11 + 1.

PROGRAM

(Scheme program from Thomas Baruchel); (define primes '(2 3 5 7 ... 999983)) (compute n) returns A088028(n) (or #f if prime list is too short) computation takes a reasonable amount of time for n <= 16 (slower than "brutal" method for small values of n, but soon becomes much quicker). Result is certified to be the smallest.

(define (compute* n mmax prod offset) (do ((i offset (+ i 1)) (l (length primes))) ((>= (* prod (do ((j 0 (+ j 1)) (p 1)) ((= j n) p) (set! p (* p (list-ref primes (+ i j)))))) mmax) mmax) (let ((p (* prod (list-ref primes i)))) (if (> n 1) (set! mmax (compute* (- n 1) mmax p (+ i 1))) (let ((s (inexact->exact (floor (sqrt (+ p 1)))))) (if (= (* s s) (+ p 1)) (set! mmax p)))))))

(define (compute n) (let* ((p (reverse (cdr primes))) (mmax (apply * (cons (car p) (list-tail p (- (length p) (- n 1)))))) (r (compute* n mmax 1 1))) (if (= mmax r) #f (inexact->exact (floor (sqrt (+ r 1)))))))

CROSSREFS

Cf. A088027.

Sequence in context: A148265 A148266 A000622 this_sequence A135960 A006611 A007462

Adjacent sequences: A088025 A088026 A088027 this_sequence A088029 A088030 A088031

KEYWORD

nonn

AUTHOR

Amarnath Murthy (amarnath_murthy(AT)yahoo.com), Sep 19 2003

EXTENSIONS

More terms from Ray Chandler (rayjchandler(AT)sbcglobal.net), Oct 04 2003

Further terms from Thomas Baruchel (baruchel(AT)users.sourceforge.net), Oct 11 2003

page 1

Search completed in 0.002 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified December 11 12:57 EST 2009. Contains 170656 sequences.


AT&T Labs Research