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.

Previous Showing 11-14 of 14 results.

A333522 Lexicographically earliest sequence of distinct positive integers such that for any nonempty set of k positive integers, say {m_1, ..., m_k}, a(m_1) XOR ... XOR a(m_k) is neither null nor prime (where XOR denotes the bitwise XOR operator).

Original entry on oeis.org

1, 8, 48, 68, 1158, 4752, 81926, 1059600, 713949458, 299601649920
Offset: 1

Views

Author

Rémy Sigrist, Mar 26 2020

Keywords

Comments

This sequence is infinite (the proof is similar to that of the infinity of A333403).
This sequence has similarities with A052349; here we combine terms with the XOR operator, there with the classical addition.
All terms, except a(1) = 1, are even.

Examples

			For n = 1:
- we can choose a(1) = 1.
For n = 2:
- 2 is prime,
- 3 is prime,
- 4 XOR 1 = 5 is prime,
- 5 is prime,
- 6 XOR 1 = 7 is prime,
- 7 is prime,
- neither 8 nor 8 XOR 1 = 9 is prime,
- so a(2) = 8.
		

Crossrefs

Programs

  • PARI
    See Links section.

Formula

a(n) = A333403(2^(n-1)).

Extensions

a(10) from Giovanni Resta, Mar 30 2020

A133266 a(1) = 30; for n >= 2, choose smallest a(n) so that no sum of 2 or more terms equals a prime.

Original entry on oeis.org

30, 32, 33, 52, 60, 63, 90, 120, 150, 180, 210, 240, 270, 300, 330, 360, 390, 420, 450, 480, 510, 540, 570, 600, 630, 660, 690, 720, 750, 780
Offset: 1

Views

Author

Robert G. Wilson v, Jan 01 2008

Keywords

Crossrefs

Programs

  • Mathematica
    (* first do *) Needs [ "Combinatorica`" ] (* then *) lst = {30}; g [ k_ ] := Block [ {j = 1, l = 2^Length@ lst}, While [ j < l && !PrimeQ [ Plus @@ NthSubset [ j, lst ] + k ], j++ ]; If [ j == l, False, True ] ]; f [ n_ ] := Block [ {k = lst [ [ -1 ] ] + 1}, While [ g@k == True, k++ ]; AppendTo [ lst, k ]; k ]; Do [ Print@ f@n, {n, 30} ]

Formula

a(n+1) = a(n) + 30 for n >= 7 (conjectured). - Chai Wah Wu, Feb 15 2020

A305579 Square array read by antidiagonals upwards in which row k has k as its first term and each subsequent term is the least possible value such that the sum of any 2 or more terms does not equal a prime.

Original entry on oeis.org

1, 2, 3, 3, 4, 5, 4, 5, 6, 87, 5, 5, 7, 8, 87, 6, 7, 11, 83, 10, 1151, 7, 8, 9, 29, 235, 12, 5371, 8, 8, 10, 79, 215, 395, 14, 199276, 9, 10, 13, 12, 131, 511, 5275, 16, 32281747, 10, 11, 12, 37, 14, 196, 8729, 76128, 18, 16946784207, 11, 11, 13, 14, 67, 16, 3983, 20526, 9782734, 20
Offset: 1

Views

Author

Randy L. Ekl and Robert G. Wilson v, Jun 05 2018

Keywords

Comments

Rows which appear to have consecutive even numbers are for k = 2, 6, 8, 14, 18, 20, 26, 36, 44, 48, 50, 54,56, 68, 74, 78, 86, 96, 114, ..., .
Conjecture: these row terms are a proper subset of A005843.

Examples

			Row 1 is A133660 and is a good illustration of the definition.
Array begins:
============================================================================
k\n|  1   2   3   4    5     6      7       8         9           10
---|------------------------------------------------------------------------
1  |  1,  3,  5, 87, 113, 1151,  5371, 199276, 32281747, 16946784207, ..., ;
2  |  2,  4,  6,  8,  10,   12,    14,     16,       18,          20, ..., ;
3  |  3,  5,  7, 83, 235,  395,  5275,  76128,  9782734, ..., ;
4  |  4,  5, 11, 29, 215,  511,  8729,  20526,  9745499, ..., ;
5  |  5,  7,  9, 79, 131,  196,  3983,  16380,   270270, ..., ;
6  |  6,  8, 10, 12,  14,   16,    18,     20,       22,          24, ..., ;
7  |  7,  8, 13, 37,  67, 1087,  5128, 137886,  6353767, ..., ;
8  |  8, 10, 12, 14,  16,   18,    20,     22,       24,          26, ..., ;
9  |  9, 11, 13, 71, 112,  281,  1952, 147630,  1729159, ..., ;
10 | 10, 11, 14, 25,  94,  756,  2394,  28480,  1466566, ..., ;
11 | 11, 13, 14, 25, 109,  559,  2719,  57985,  2589731, ..., ;
12 | 12, 13, 14, 37,  79,  673,  2929, 113256,  9708060, ..., ;
13 | 13, 14, 19, 31,  97,  882,  2028, 161340,  3635970, ..., ;
14 | 14, 16, 18, 20,  22,   24,    26,     28,       30,          32, ..., ;
15 | 15, 17, 18, 31, 137,  502,  7983, 599346, 27105801, ..., ;
16 | 16, 17, 18, 47, 107,  395,  6480,  91140,   467730, ..., ;
17 | 17, 18, 21, 31,  77,  637,  3609,  77910,   652680, ..., ;
18 | 18, 20, 22, 24,  26,   28,    30,     32,       34,          36, ..., ;
19 | 19, 20, 25, 30,  61,  235,  2965,   4415,   394170,     5769540, ..., ;
20 | 20, 22, 24, 26,  28,   30,    32,     34,       36,          38, ..., ;
21 | 21, 23, 25, 47,  73,  797, 20419, 235665,      ..., ;
22 | 22, 23, 27, 42,  69,  462,   672,    783,    71652,      935298, ..., ;
23 | 23, 25, 26, 37,  73, 1555,  4219, 196260,  3698520, ..., ;
24 | 24, 25, 26, 31, 193,  504,  3756,  91831,  7703843, ..., ;
25 | 25, 26, 29, 31,  39,  750,  4350,  85830,   661350, ..., ;
26 | 26, 28, 30, 32,  34,   36,    38,     40,       42,          44, ..., ;
27 | 27, 28, 29, 35, 232,  888,  5670, 134400,  4058376, ..., ;
28 | 28, 29, 34, 53,  59, 1045,  3696, 249240,  9475589, ..., ;
29 | 29, 31, 33, 55,  57,  674,  6581, 126272,  2549747, ..., ;
30 | 30, 32, 33, 52,  60,   63,    90,    120,      150,         180, ..., ;
31 | 31, 32, 33, 54,  90,  714,  9450, 188850,  2598573, ..., ;
32 | 32, 33, 37, 45, 138,  597,  2703, 101055,  2754885, ..., ;
33 | 33, 35, 37, 47, 133,  555,  4155, 332885,  3090195, ..., ;
34 | 34, 35, 41, 43,  77,  594,  2940,  35700,  2323246, ..., ;
35 | 35, 37, 39, 43, 210, 1061, 10125, 372955, 30373014, ..., ;
36 | 36, 38, 40, 42,  44,   46,    48,     50,       52,          54, ..., ;
37 | 37, 38, 39, 47,  48,  631,  8862, 124851,  4972506, ..., ;
..., etc.
		

Crossrefs

Cf. A005843, A052349, A133660, A133661, first column: A000027.

Programs

  • Mathematica
    (* first do *) Needs["Combinatorica`"] (* then *) lst = {k}; g[k_] := Block[{j = 1, l = 2^Length@lst}, While[j < l && !PrimeQ[Plus @@ NthSubset[j, lst] + k], j++ ]; If[j == l, False, True]]; f[n_] := Block[{k = lst[[-1]] + 1}, While[PrimeQ@k || g[k] == True, k++; k++ ]; AppendTo[lst, k]; k]; Do[ Print@ f@ n, {n, 10}] (* Robert G. Wilson v, Jun 05 2018 *)

A359065 Lexicographically earliest sequence of distinct positive composite integers such that no subsequence sums to a prime and in which all terms are coprime.

Original entry on oeis.org

4, 21, 65, 209, 391, 3149, 9991, 368131, 57556589, 14865154981
Offset: 1

Views

Author

Conor Houghton, Dec 15 2022

Keywords

Comments

The sequences A052349 and A068638 are composed of integers starting from one with the rule that no subsequence has a prime sum; these sequences start with one. Starting with a different number seems to result in straightforward geometric sequences, for example the sequence with no prime subsequence sums starting with four is 4, 6, 8, and so on. One way to avoid this is to enforce a coprime rule, requiring that the entries to the sequence are coprime. It is not clear whether the sequence is infinite.

Crossrefs

Programs

  • Mathematica
    k = 4; K = {k}; f = {2}; q = Subsets[K]; While[Length@K < 10, k++; If[! PrimeQ[k] && ! IntersectingQ[FactorInteger[k][[All, 1]], f], s = k; z = 0; For[p = 1, p <= Length@q, p++, If[PrimeQ[Total[q[[p]]] + k], z = 1; Break[]]]; If[z == 0, AppendTo[K, k]; q = Subsets[K]; AppendTo[f, FactorInteger[k][[All, 1]]]; f = Flatten[f]]]]; Print[K] (* Samuel Harkness, Apr 11 2023 *)
  • Python
    import sys
    import math
    from sympy.ntheory import primefactors
    from sympy.ntheory import primerange
    def intersection(lst1, lst2):
        lst3 = [value for value in lst1 if value in lst2]
        return len(lst3)
    n_primes=1000000
    factors=[primefactors(n) for n in range(0,n_primes)]
    primes=list(primerange(0, n_primes))
    sequence=[4]
    sums=[sequence[0]]
    prime_factors=[f for f in factors[sequence[0]]]
    big_n=8
    while len(sequence)
    				
  • Python
    from math import gcd
    from sympy import isprime
    from itertools import islice
    def agen(start=4): # generator of terms
        alst, k, sums = [start], start+1, {0} | {start}
        while True:
            yield alst[-1]
            while any(gcd(k, an) != 1 for an in alst) or \
                  any(k+s not in sums and isprime(k+s) for s in sums):
                k += 1
            alst.append(k)
            sums.update([k + s for s in sums])
            k += 1
    print(list(islice(agen(), 8))) # Michael S. Branicky, Dec 16 2022

Extensions

a(8)-a(9) from Michael S. Branicky, Dec 15 2022
a(10) from Rémy Sigrist, Dec 16 2022
Previous Showing 11-14 of 14 results.