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-2 of 2 results.

A048458 'Prime last odd terms' from generation 2 onwards.

Original entry on oeis.org

7, 23, 67, 179, 1109, 17427659, 1586875049, 7021048691, 1104052140838673681, 80729882077782801781, 49474191359283212247841, 152695677551802424534973144788818335406948326813, 50258816309715893690860594601285860231033059311672877749
Offset: 1

Views

Author

Patrick De Geest, May 15 1999

Keywords

Comments

Intersection of A000040 and A048457.

Crossrefs

For "Generations" see A048448-A048455. Cf. A048459. See also A047844.

Extensions

a(9) - a(13) from Nathaniel Johnston, Apr 11 2011

A354430 First diagonal of an array, generated from the sequence of the nonprimes.

Original entry on oeis.org

1, 7, 22, 58, 142, 334, 766, 1726, 3837, 8435, 18364, 39646, 84986, 181117, 384160, 811676, 1709425, 3590213, 7522354, 15728427, 32827027, 68405533, 142344708, 295824870, 614046159, 1273068141, 2636250146, 5452584131, 11264148401, 23242423457, 47903544728
Offset: 1

Views

Author

Tamas Sandor Nagy, May 27 2022

Keywords

Comments

Mirroring the idea in A048457, here with nonprimes, and including 1 of the first generation.
We write down the sequence of the nonprimes 1, 4, 6, ... in the first row of the array. Nonprime(k) + nonprime(k+2) will generate the second row. Thereafter we generate the further rows in a similar manner. The leftmost diagonal gives the sequence.

Examples

			1    4    6    8    9   10   12   14   15   16   18   20   21 ...
     7   12   15   18   21   24   27   30   33   36   39 ...
         22   30   36   42   48   54   60   66   72 ...
              58   72   84   96  108  120  132 ...
                  142  168  192  216  240 ...
                       334  384  432 ...
                            766 ...
		

Crossrefs

Programs

  • Python
    from sympy import composite
    from functools import lru_cache
    @lru_cache(maxsize=None)
    def T(r, k):
        if r == 1: return 1 if k == 1 else composite(k-1)
        return T(r-1, k) + T(r-1, k+2)
    def a(n): return T(n, 1)
    print([a(n) for n in range(1, 30)]) # Michael S. Branicky, May 28 2022

Extensions

a(8) and beyond from Michael S. Branicky, May 28 2022
Showing 1-2 of 2 results.