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.

User: Yves Debeuret

Yves Debeuret's wiki page.

Yves Debeuret has authored 5 sequences.

A290507 Sums and differences of products of the first n primes partitioned into two disjoint parts.

Original entry on oeis.org

1, 5, 7, 11, 13, 17, 23, 29, 31, 37, 41, 47, 67, 73, 83, 89, 97, 101, 103, 107, 127, 131, 139, 151, 157, 163, 169, 179, 181, 199, 221, 227, 239, 241, 263, 307, 313, 323, 337, 347, 349, 353, 359, 361, 379, 383, 389, 391, 397, 421, 457, 463, 467, 491, 499, 521, 527, 601, 619, 643, 653, 667, 673, 709, 713
Offset: 1

Author

Yves Debeuret, Aug 04 2017

Keywords

Comments

Partition the set Pn = {2,3,5,...,pn} of the first n primes into two disjoint parts. Let a,b be their respective products, S = a + b and D = |a - b|. The list is composed of sorted values of S and D.
Numbers a,b share no common factors. It follows that the prime factors of S or D can't divide either a or b. So the smallest possible prime factor of S or D is pn+1.
After the value 1, the next 25 numbers of the list are primes. Then the proportion of primes decreases. For the first 2000 elements, about 50% are primes.

Examples

			3 - 2 = 1
2 + 3 = 5
2*5 - 3 = 7
2*3 + 5 = 11
2*5 + 3 = 13
3*5 + 2 = 17
2*3*5 - 7 = 23
2*7 + 3*5 = 29
2*5 + 3*7 = 31
...
		

Programs

  • JavaScript

A276988 a(n) is the least k such that 10*k+prime(n) is composite.

Original entry on oeis.org

1, 3, 1, 2, 1, 2, 1, 2, 1, 1, 2, 2, 1, 2, 1, 1, 1, 2, 1, 1, 2, 2, 1, 1, 2, 1, 2, 1, 1, 1, 2, 1, 1, 2, 1, 1, 2, 2, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 2, 1, 2, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 2, 2, 1, 1, 1, 1, 2, 1, 2, 1, 2, 2, 1, 1, 2, 1, 1
Offset: 1

Author

Yves Debeuret, Sep 24 2016

Keywords

Comments

It appears that a(n)<3 for n>2 (checked up to 10^7).
This comment is surely true since every prime except 3 equals 1 or 2 mod 3, so the addition of 10 == 1 mod 3 once or twice makes it divisible by 3. So (3 - (prime(n) mod 3)) is an upper bound. - Andrey Zabolotskiy, Nov 01 2016

Examples

			For n=1, 10+2=3x4 so a(1)=1;
For n=2, 13 and 23 are prime, but then 30+3=3x11 so a(2)=3;
For n=3, 10+5=3x5 so a(3)=1;
For n=4, 17 is prime, but then 20+7=3x9 so a(4)=2.
		

Programs

  • Maple
    f:= proc(n) local p,k;
      p:= ithprime(n);
      for k from 1 do if not isprime(p+10*k) then return k fi od
    end proc:
    map(f, [$1..100]); # Robert Israel, Nov 04 2024
  • PARI
    isc(n) = (n > 1) && !isprime(n);
    a(n) = my(k = 0, p = prime(n)); while(!isc(p+10*k), k++); k; \\ Michel Marcus, Sep 27 2016

Extensions

More terms from Michel Marcus, Sep 27 2016

A249630 Sums of the composite numbers placed between two consecutive prime numbers (A054265), sorted in increasing order.

Original entry on oeis.org

0, 4, 6, 12, 18, 27, 30, 42, 45, 60, 63, 72, 102, 108, 117, 130, 135, 138, 150, 170, 180, 192, 198, 207, 228, 240, 243, 250, 270, 280, 282, 297, 312, 315, 320, 333, 348, 380, 387, 420, 430, 432, 462, 495, 522, 570, 585, 600, 618, 642, 651, 660, 670, 675, 693
Offset: 1

Author

Yves Debeuret, Nov 02 2014

Keywords

Comments

The first number that occurs more than once is 2592 = a(143) = a(144). - Robert Israel, Nov 11 2014

Crossrefs

Cf. A054265.

Programs

  • Maple
    N:= 1000: # to get all terms <= N
    Primes:= select(isprime,[2,seq(2*i+1,i=1..floor(N/2))]):
    B:= [seq((Primes[i+1]+Primes[i])*(Primes[i+1]-Primes[i]-1)/2, i=1..nops(Primes)-1)]:
    sort(select(`<=`,B,N)); # Robert Israel, Nov 11 2014
  • Mathematica
    With[{nn=60},Take[Sort[Total[Range[#[[1]]+1,#[[2]]-1]]&/@Partition[ Prime[ Range[3*nn]],2,1]],nn]] (* Harvey P. Dale, Sep 25 2015 *)
  • PARI
    lista() = {vitp = readvec("c:/gp/bfiles/b029707.txt"); for (k=1, #vitp, v = []; for (n=1, k, vn = vitp[n]; for (j=1, vn, newv = (prime(j+1)+prime(j))*(prime(j+1)-prime(j)-1)/2; if (! vecsearch(v, newv), v = vecsort(concat(v, newv)));););/* to see intermediate results for (i=1, #v, if (v[i] <= newv, print1(v[i], ", "));); print();*/); v;} \\ Michel Marcus, Nov 11 2014

Extensions

More terms from Michel Marcus, Nov 11 2014

A197124 Extract positive numbers from the infinite string of prime numbers 235711131719..., constructing the smallest numbers which have not appeared in an earlier extraction.

Original entry on oeis.org

2, 3, 5, 7, 1, 11, 31, 71, 9, 23, 29, 313, 74, 14, 34, 75, 35, 96, 16, 77, 17, 37, 98, 38, 99, 710, 110, 310, 7109, 113, 12, 713, 1137, 13, 91, 4, 915, 115, 716, 316, 717, 317, 918, 119, 1193, 19, 719, 92, 112, 232, 27, 22, 923, 32, 39, 24, 125, 1257, 26
Offset: 1

Author

Yves Debeuret, Oct 10 2011

Keywords

Comments

The infinite stream of prime digits is basically chopped into slices such that each of the digits is used exactly once and the outcoming stream does not contain duplicates.

Examples

			The initial digits 2, 3, 5, 7 and 1 are all extracted in the order of occurrence. The next 1 is rejected because it appeared earlier, and united with the (overall) third 1 to extract 11. The next 3 (from 13) appeared already earlier and is combined with the following 1 (from the 17) to created 31.
		

Crossrefs

Programs

  • Mathematica
    nn=100; digs = Flatten[Table[IntegerDigits[Prime[n]], {n, nn}]]; numList = {}; While[digs != {}, num = 0; While[num = num*10 + digs[[1]]; digs = Rest[digs]; newNum = ! MemberQ[numList, num]; (num == 0 || ! newNum) && digs != {}]; If[newNum, AppendTo[numList, num]]]; numList (* T. D. Noe, Oct 31 2011 *)
  • Python
    from sympy import nextprime
    from itertools import islice
    def diggen():
        p = 2
        while True:
            yield from list(map(int, str(p)))
            p = nextprime(p)
    def agen(): # generator of terms
        g = diggen()
        aset, nextd = set(), next(g)
        while True:
            an, nextd = nextd, next(g)
            while an in aset or nextd == 0:
                an, nextd = int(str(an) + str(nextd)), next(g)
            yield an
            aset.add(an)
    print(list(islice(agen(), 80))) # Michael S. Branicky, Mar 31 2022

A180933 Initial segments of A010051, interpreted as binary numbers, that are prime.

Original entry on oeis.org

3, 13, 53, 222630977, 3916565571106302349381
Offset: 1

Author

Yves Debeuret, Sep 26 2010

Keywords

Comments

The main entry for this sequence is A124077.
The binary expansion of all terms of this sequence is some initial segment of 1101010001010001....
Next terms have 642, 1268, ... decimal digits.
Primes in an initial portion of the infinite binary string built from the prime characteristic function A010051. - R. J. Mathar, Sep 26 2010

Examples

			a(2) = 13, which is 1101 in binary, corresponding to the characteristic sequence of the primes: 2 is prime, 3 is prime, 4 is composite, 5 is prime.
		

Crossrefs

Subset of A072762.

Programs

  • Maple
    A072762 := proc(n) option remember; if n =1 then return 0; elif n =2 then return 1; end if; if isprime(n) then 2*procname(n-1)+1 ; else 2*procname(n-1) ; end if; end proc:
    for n from 1 to 300 do p := A072762(n) ; if isprime(p) then printf("%d,",p) ; end if; end do: # R. J. Mathar, Sep 26 2010
  • PARI
    my(n=1);for(k=3,1e4,n+=n+isprime(k);if(ispseudoprime(n),print1(n", ")))

Formula

A000040 INTERSECT A072762. a(n) = A072762(A124077(n)). - R. J. Mathar, Sep 26 2010 [corrected by Jason Yuen, Oct 14 2024]

Extensions

Extended and rewritten by Charles R Greathouse IV, Sep 27 2010