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.

A252094 First member of a pair (A,B) to define the n-th Zeisel number, cf. A051015.

Original entry on oeis.org

1, 4, 1, 2, 3, 2, 10, 2, 6, 4, 13, 8, 3, 2, 25, 5, 9, 28, 1, 6, 5, 17, 34, 15, 9, 23, 8, 49, 55, 12, 4, 33, 14, 2, 24, 36, 25, 2, 26, 4, 2, 42, 29, 11, 8, 2, 10, 4, 88, 6, 47, 32, 48, 20, 94, 37, 23, 57, 24, 3, 5, 115, 6, 118, 9, 44, 3, 46, 68, 5, 30, 139, 50, 10, 51, 14, 77, 20, 54, 2
Offset: 1

Views

Author

Reinhard Zumkeller, Dec 15 2014

Keywords

Comments

Let p(0) = 1 and p(i+1) = A*p(i) + B, if p(i) is prime for i = 1..k, then z = p(1) * ... * p(k) is called a Zeisel number.

Examples

			.  n |   A=a(n)  B=A252095(n) | p(1)  p(2)  p(3) | A051015(n)
. ---+------------------------+------------------------------
.  1 |   1       2            |   3     5     7  |        105
.  2 |   4      -1            |   3    11    43  |       1419
.  3 |   1       6            |   7    13    19  |       1729
.  4 |   2       3            |   5    13    29  |       1885
.  5 |   3       2            |   5    17    53  |       4505
.  6 |   2       5            |   7    19    43  |       5719
.  7 |  10      -7            |   3    23   223  |      15387
.  8 |   2       9            |  11    31    71  |      24211
.  9 |   6      -1            |   5    29   177  |      25085
. 10 |   4       3            |   7    31   141  |      27449
. 11 |  13     -10            |   3    29   367  |      31929
. 12 |   8      -3            |   5    37   295  |      54205 .
		

Crossrefs

Cf. A051015, A027746, A252095 (B values).

Programs

  • Haskell
    a252094 n = a252094_list !! (n-1)
    (a252094_list, a252095_list) = unzip $ f 3 where
       f x = if z then (q, p - q) : f (x + 2) else f (x + 2)  where
             z = 0 `notElem` ds && length ds > 2 &&
                 all (== 0) (zipWith mod (tail ds) ds) && all (== q) qs
             q:qs = (zipWith div (tail ds) ds)
             ds = zipWith (-) (tail ps) ps
             ps = 1 : ps'; ps'@(p:_) = a027746_row x