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

A255402 First differences of A061781.

Original entry on oeis.org

2, 3, 3, 4, 4, 4, 4, 4, 4, 6, 5, 6, 4, 5, 4, 4, 8, 5, 6, 5, 4, 6, 6, 7, 6, 6, 5, 5, 4, 8, 6, 6, 8, 6, 6, 7, 5, 7, 6, 6, 8, 5, 7, 6, 5, 7, 6, 9, 6, 8, 5, 6, 7, 6, 4, 4, 9, 9, 6, 5, 6, 9, 9, 6, 6, 10, 5, 9, 8, 8, 7, 7, 6, 6, 8, 6, 8, 8, 7, 7, 7, 7, 6, 8, 8, 7, 7, 6, 7, 6, 6, 8, 5, 9, 5, 9, 6, 9, 8
Offset: 1

Views

Author

Zak Seidov, Feb 22 2015

Keywords

Crossrefs

Cf. A061781.

Formula

a(n) = A061781(n+1) - A061781(n).

A343997 a(n) = A011772(n) if that number is even, otherwise A011772(n)+1.

Original entry on oeis.org

2, 4, 2, 8, 4, 4, 6, 16, 8, 4, 10, 8, 12, 8, 6, 32, 16, 8, 18, 16, 6, 12, 22, 16, 24, 12, 26, 8, 28, 16, 30, 64, 12, 16, 14, 8, 36, 20, 12, 16, 40, 20, 42, 32, 10, 24, 46, 32, 48, 24, 18, 40, 52, 28, 10, 48, 18, 28, 58, 16, 60, 32, 28, 128, 26, 12, 66, 16, 24, 20, 70, 64, 72, 36, 24, 56, 22, 12, 78, 64, 80
Offset: 1

Views

Author

N. J. A. Sloane, Jun 01 2021

Keywords

Crossrefs

Programs

  • Python
    from sympy.ntheory.modular import crt
    from sympy import factorint
    from itertools import product
    def A343997(n):
        fs = factorint(2*n)
        plist = [p**fs[p] for p in fs]
        x = min(k for k in (crt(plist,d)[0] for d in product([0,-1],repeat=len(plist))) if k > 0)
        return x + x % 2 # Chai Wah Wu, Jun 01 2021

A343996 a(n) = A011772(n) if that number is odd, otherwise A011772(n)+1.

Original entry on oeis.org

1, 3, 3, 7, 5, 3, 7, 15, 9, 5, 11, 9, 13, 7, 5, 31, 17, 9, 19, 15, 7, 11, 23, 15, 25, 13, 27, 7, 29, 15, 31, 63, 11, 17, 15, 9, 37, 19, 13, 15, 41, 21, 43, 33, 9, 23, 47, 33, 49, 25, 17, 39, 53, 27, 11, 49, 19, 29, 59, 15, 61, 31, 27, 127, 25, 11, 67, 17, 23, 21, 71, 63, 73, 37, 25, 57, 21, 13, 79, 65, 81, 41
Offset: 1

Views

Author

N. J. A. Sloane, Jun 01 2021

Keywords

Crossrefs

Programs

  • Python
    from sympy.ntheory.modular import crt
    from sympy import factorint
    from itertools import product
    def A343996(n):
        fs = factorint(2*n)
        plist = [p**fs[p] for p in fs]
        x = min(k for k in (crt(plist,d)[0] for d in product([0,-1],repeat=len(plist))) if k > 0)
        return x + 1 - x % 2 # Chai Wah Wu, Jun 01 2021

A062294 A B_2 sequence: a(n) is the smallest prime such that the pairwise sums of distinct elements are all distinct.

Original entry on oeis.org

2, 3, 5, 7, 11, 17, 29, 47, 67, 83, 131, 163, 233, 307, 397, 443, 617, 727, 809, 941, 1063, 1217, 1399, 1487, 1579, 1931, 2029, 2137, 2237, 2659, 2777, 3187, 3659, 3917, 4549, 4877, 5197, 5471, 5981, 6733, 7207, 7349, 8039, 8291, 8543, 9283, 9689, 10037
Offset: 1

Views

Author

Labos Elemer, Jul 02 2001

Keywords

Crossrefs

Programs

  • Python
    from itertools import islice
    from sympy import nextprime
    def A062294_gen(): # generator of terms
        aset2, alist, k = set(), [], 0
        while (k:=nextprime(k)):
            bset2 = set()
            for a in alist:
                if (b:=a+k) in aset2:
                    break
                bset2.add(b)
            else:
                yield k
                alist.append(k)
                aset2.update(bset2)
    A062294_list = list(islice(A062294_gen(),30)) # Chai Wah Wu, Sep 11 2023

Extensions

Edited, corrected and extended by Klaus Brockhaus, Sep 17 2007

A061784 Number of sums prime(i) + prime(j) that occur more than once for 1 <= i <= j <= n, where prime(k) = k-th prime.

Original entry on oeis.org

0, 0, 0, 1, 2, 4, 7, 11, 16, 22, 27, 34, 41, 51, 61, 73, 86, 96, 110, 124, 140, 158, 175, 193, 211, 231, 252, 275, 299, 325, 348, 374, 401, 427, 456, 486, 516, 549, 581, 615, 650, 684, 722, 759, 798, 839, 879, 921, 961, 1005, 1048, 1095, 1142, 1189, 1238
Offset: 1

Views

Author

Labos Elemer, Jun 22 2001

Keywords

Examples

			Let P(n) = {2, 3, .., p_n} be the set of the first n primes. Construct S(n) = {p+q : p,q in P}. If every sum p+q were distinct, then |S(n)| would be n*(n+1)/2 = A000217(n). But in reality, for n >= 4, certain sums occur more than once. a(n) is the count of repeated values. For example, P(6) = {2, 3, 5, 7, 11, 13} yields S(6) = {4, 5, 6, 7, 8, 9, 10, 12, 13, 14, 15, 16, 18, 20, 22, 24, 26}, but 4 sums arise more than once: 10 = 3+7 = 5+5, 14 = 3+11 = 7+7, 16 = 3+13 = 5+11, 18 = 5+13 = 7+11. Thus, a(6) = 4 = A000217(n) - |S(6)|.
		

Crossrefs

Programs

  • Mathematica
    f[x_] := Prime[x] t1=Table[Length[Union[Flatten[Table[f[u]+f[w], {w, 1, m}, {u, 1, m}]]]], {m, 1, 75}] t=Table[(w*(w+1)/2)-Part[t1, w], {w, 1, 75}]
Showing 1-5 of 5 results.