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.

Showing 1-3 of 3 results.

A187099 Inverse permutation to A187098.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 9, 8, 11, 10, 14, 12, 13, 15, 18, 16, 17, 19, 21, 20, 25, 22, 23, 24, 27, 26, 30, 28, 29, 31, 33, 32, 40, 34, 35, 39, 37, 36, 41, 44, 38, 42, 45, 43, 48, 50, 46, 47, 51, 49, 55, 52, 57, 56, 53, 54, 59, 61, 58, 65, 63, 60, 84, 62, 64, 67, 69, 68, 66, 70, 71, 72, 74, 73, 77, 75, 76, 82, 79
Offset: 1

Views

Author

Reinhard Zumkeller, Mar 04 2011

Keywords

Crossrefs

Cf. A187098.

Programs

  • Haskell
    import Data.List  (elemIndex); import Data.Maybe (fromJust)
    a187099 = (+ 1) . fromJust . (`elemIndex`a187098_list)
    -- Reinhard Zumkeller, Aug 04 2015

A187072 Prime numbers chosen such that the even numbers that are the sum of two consecutive terms occur only once and occur as early as possible.

Original entry on oeis.org

3, 3, 5, 5, 7, 7, 11, 5, 17, 3, 23, 5, 19, 11, 23, 13, 19, 19, 23, 17, 29, 19, 31, 13, 41, 11, 47, 13, 43, 19, 47, 17, 53, 19, 59, 17, 67, 7, 61, 19, 67, 23, 59, 29, 67, 31, 61, 41, 53, 47, 59, 53, 61, 43, 67, 41, 79, 37, 89, 29, 101, 23, 109, 13, 127, 7, 131, 5, 137, 7, 139, 11, 137, 17, 139, 13, 149, 11, 157, 7, 151, 19, 109, 67, 107, 59, 113, 67
Offset: 1

Views

Author

Reinhard Zumkeller, Mar 03 2011

Keywords

Comments

The even numbers a(n) + a(n+1) are in sequence A187085.
The terms for even n grow rapidly; for odd n they grow slowly. It appears that primes occur at a consistent frequency: in the first 1000000 terms, primes 3 to 23 occur about 4.7%, 4.9%, 3.4%, 2.9%, 2.6%, 2.0%, 1.8%, and 1.4% of the time. - T. D. Noe, Mar 04 2011

Examples

			Primes: 3 3 5  5  7  7  11  5  17  3  23  5  19  11  23  13  19  19  23
Evens:   6 8 10 12 14 18  16 22  20 26  28 24  30  34  36  32  38  42
		

Crossrefs

Programs

  • Haskell
    import Data.Set (Set, empty, member, insert)
    a187072 n = a187072_list !! (n-1)
    a187072_list = goldbach 0 a065091_list empty where
      goldbach :: Integer -> [Integer] -> Set Integer -> [Integer]
      goldbach q (p:ps) gbEven
          | qp `member` gbEven = goldbach q ps gbEven
          | otherwise          = p : goldbach p a065091_list (insert qp gbEven)
          where qp = q + p
    -- performance bug fixed: Reinhard Zumkeller, Mar 06 2011
  • Mathematica
    lastE=10; eList=Range[6,lastE,2]; evens[k_] := If[k<=Length[eList], eList[[k]], lastE+=2; AppendTo[eList,lastE]; lastE]; Join[{lastP=3}, Table[k=1; While[p=evens[k]-lastP; p<0 || !PrimeQ[p], k++]; eList=Delete[eList,k]; lastP=p, {999}]] (* T. D. Noe, Mar 04 2011 *)
    s={3,3}; ev={6}; a=3; Do[k=2; While[!FreeQ[ev,(b=a+(p=Prime[k]))],k++]; a=p; AppendTo[ev,b]; AppendTo[s,a], {3000}]; s (* Zak Seidov, Mar 03 2011 *)

A187085 Even numbers > 4 as generated by A187072.

Original entry on oeis.org

6, 8, 10, 12, 14, 18, 16, 22, 20, 26, 28, 24, 30, 34, 36, 32, 38, 42, 40, 46, 48, 50, 44, 54, 52, 58, 60, 56, 62, 66, 64, 70, 72, 78, 76, 84, 74, 68, 80, 86, 90, 82, 88, 96, 98, 92, 102, 94, 100, 106, 112, 114, 104, 110, 108, 120, 116, 126, 118, 130, 124, 132, 122, 140, 134, 138, 136, 142, 144, 146, 150, 148, 154, 156, 152, 162, 160, 168, 164, 158
Offset: 1

Views

Author

Reinhard Zumkeller, Mar 04 2011

Keywords

Comments

a(n) = A187072(n) + A187072(n+1) = 2*A187098(n+2).

Crossrefs

Programs

  • Haskell
    a187085  n = a187085_list !! (n-1)
    a187085_list = zipWith (+) a187072_list $ tail a187072_list
Showing 1-3 of 3 results.