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: Werner D. Sand

Werner D. Sand's wiki page.

Werner D. Sand has authored 13 sequences. Here are the ten most recent ones:

A249241 a(n) = p - prime(n)!/prime(n)#, where p is the smallest prime number > prime(n)!/prime(n)#+1.

Original entry on oeis.org

2, 2, 3, 5, 11, 7, 29, 17, 17, 397, 47, 67, 23, 41, 31, 157, 409, 31, 151, 109, 199, 191, 131, 61, 103, 547, 179, 269, 389, 317, 181, 331, 307, 173, 1259, 1289, 619, 131, 223, 683, 139, 241, 191, 101, 1039, 1367, 1153, 241, 1187, 479, 149, 181, 487, 1093, 571, 1151, 809, 199, 823, 491, 191, 151, 1321, 197, 163, 337, 467, 659, 673, 877, 487, 743, 313, 673, 857, 677, 1021
Offset: 1

Author

Werner D. Sand, Oct 23 2014

Keywords

Comments

Conjecture: All terms are prime.
While Fortune's conjecture (A005235) uses products of primes, this sequence uses products of composite numbers (more exactly: of nonprimes, because 1 belongs to them). It looks like all multiples of prime(n)# (except some powers) lead to a sequence which contains only prime numbers.

Examples

			n = 1; prime(1)!/prime(1)# = 2/2 = 1; p = nextprime(1+1) = 3; a(1) = 3-1 = 2.
		

Crossrefs

Cf. A092435.

Programs

  • MuPAD
    q:=1; p:=1; for i from 1 to 100 do q:=nextprime(q+1); p:=p*q; N:=nextprime((fact(q)/p)+2)-fact(q)/p; print(i,N); end_for:
    
  • PARI
    A092435(n)=prime(n)!/prod(i=1,n,prime(i))
    a(n)=my(t=A092435(n)); nextprime(t+2)-t \\ Charles R Greathouse IV, Oct 23 2014

A248714 a(n) = p - prime(n)#^2, where prime(n)# is the product of the first n primes and p is the smallest prime > prime(n)#^2 + 1.

Original entry on oeis.org

3, 5, 7, 11, 17, 29, 23, 41, 29, 37, 89, 79, 89, 71, 439, 389, 163, 79, 151, 73, 89, 211, 113, 113, 419, 167, 139, 199, 173, 137, 487, 197, 401, 167, 739, 641, 461, 199, 223, 331, 379, 401, 293, 223, 251, 647, 593, 613, 317, 271, 257, 947, 331, 347, 593, 433
Offset: 1

Author

Werner D. Sand, Oct 12 2014

Keywords

Comments

Conjecture: Analogous to Fortune's Conjecture (A005235) all a(n) are prime, so are all members of a(n)=p-k*prime(n)#, k=natural number.
Besides, many powers p-prime(n)#^m, m=natural number, behave as well, e.g. p-prime(n)#^29 does, p-prime(n)#^30 does not.

Crossrefs

Programs

  • MuPAD
    q:=1;p:=1;for i from 1 to 100 do q:=nextprime(q+1);p:=p*q;N:=nextprime(p^2+2)-p^2;print(i,N);end_for: \\ Werner D. Sand, Oct 13 2014
  • PARI
    a(n) = {hp = prod(ip=1, n, prime(ip)); nextprime(hp^2+2) - hp^2;} \\ Michel Marcus, Oct 12 2014
    

A135097 Decimal expansion of a certain constant U (see A135096 for further information).

Original entry on oeis.org

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

Author

Werner D. Sand, Nov 25 2007, Dec 01 2007

Keywords

Examples

			For example, take c=log 2. Each n>2 has the form n=floor(m^(log 2)+p), where m is natural number and p prime.
		

Crossrefs

Cf. A135096.

A135096 Decimal expansion of certain constant L.

Original entry on oeis.org

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

Author

Werner D. Sand, Nov 25 2007, Dec 01 2007

Keywords

Comments

Conjecture: With any real number c in the interval [L,U] there exists for each natural number n>2 a natural number m and a prime number p so that n=floor(m^c)+p. L is the lower bound of c. U is the upper bound of c. L = 0.5781296526305628137240577579803... U = 1.3652123889685187297293386676777... (A135097).
L is close to the Euler-Mascheroni constant Gamma = 0.5772... I am continuing calculating further digits.

Examples

			Let c=1.23456789 (arbitrary). Each natural number n>2 has the form n=floor(m^1.23456789+p), where m is natural number and p prime.
		

Crossrefs

Cf. A135097.

Extensions

Leading zero removed by R. J. Mathar, Feb 05 2009

A109756 If you sum 3 consecutive odd prime numbers p,q,r, you get a number s which is either prime or not: p+q+r=s. If s is prime, you call it p and repeat the game. If s is not prime, you call the largest prime factor p and repeat the game. Finally, you get into an infinite cycle, which is one of the above 3 sequences, no matter what initial prime numbers you choose.

Original entry on oeis.org

7, 31, 109, 349, 1061, 103, 29, 97, 43, 13, 11, 41, 131, 37, 17, 59
Offset: 1

Author

Werner D. Sand, Aug 12 2005

Keywords

Comments

You can invent numerous variations which generate other cycles, but always you end in 2 or 3 cycles.

Examples

			p=7
7+11+13=31
31+37+41=109
109+113+127=349
349+353+359=1061
1061+1063+1069=3193=31*103
103+107+109=319=11*29
29+31+37=97
97+101+103=301=7*43
43+47+53=143=11*13
13+17+19=49=7*7
7+11+13...
		

Crossrefs

Cf. A117631.

Formula

p+q+r=s, prime. s=p. repeat. p+q+r=s=f1*f2*f3..., fi prime. Largest f=p. repeat.

A075765 a(n) = floor(prime(n)/n) + (prime(n) mod n).

Original entry on oeis.org

2, 2, 3, 4, 3, 3, 5, 5, 7, 11, 11, 4, 5, 4, 5, 8, 11, 10, 13, 14, 13, 16, 17, 20, 25, 26, 25, 26, 25, 26, 7, 7, 9, 7, 13, 11, 13, 15, 15, 17, 19, 17, 23, 21, 21, 19, 27, 35, 35, 33, 33, 35, 33, 39, 41, 43, 45, 43, 45, 45, 43, 49, 59, 59, 57, 57, 67, 69, 7, 73, 73, 75, 7, 8, 9, 8, 9, 12
Offset: 1

Author

Werner D. Sand, Oct 09 2002

Keywords

Comments

The digital sum base n of the n-th prime. - Hieronymus Fischer, Dec 24 2007

Examples

			p(9)/9=23/9=2+5/9; a(9)=2+5=7
		

Crossrefs

Cf. A007953.

Programs

  • Mathematica
    fmQ[n_]:=Module[{pn=Prime[n]},Floor[pn/n]+Mod[pn,n]]
    fmQ/@Range[90]  (* Harvey P. Dale, Feb 25 2011 *)

Formula

p(n)/n = k + r; r
a(n) = ds_n(prime(n)), where ds_n = digital sum base n. - Hieronymus Fischer, Oct 09 2007
a(n) = prime(n) - (n-1)*sum_{k>0} floor(prime(n)/n^k) = prime(n) - (n-1)*floor(prime(n)/n). - Hieronymus Fischer, Oct 09 2007

Extensions

Corrected by Hieronymus Fischer, Oct 09 2007

A074500 Difference between n*sqrt(n)+1 and prime(n), rounded to nearest integer.

Original entry on oeis.org

0, 1, 1, 2, 1, 3, 3, 5, 5, 4, 6, 6, 7, 10, 12, 12, 12, 16, 17, 19, 24, 25, 28, 30, 29, 33, 38, 42, 48, 52, 47, 51, 54, 60, 59, 66, 69, 72, 78, 81, 85, 92, 92, 100, 106, 114, 112, 111, 117, 126, 132, 137, 146, 147, 152, 157, 162, 172, 177, 185, 194, 196, 194, 202, 212
Offset: 1

Author

Werner D. Sand, Sep 26 2002

Keywords

Examples

			a(3) = round(3*sqrt(3) + 1 - prime(3)) = round(5.196... + 1 - 5) = round(1.196...) = 1.
		

Formula

a(n) = round(n*sqrt(n) + 1 - prime(n)).

A074766 a(n) = prime(2n) - 2*prime(n) - n.

Original entry on oeis.org

-2, -1, 0, 1, 2, 5, 2, 7, 6, 3, 6, 3, 6, 7, 4, 9, 4, 11, 10, 11, 14, 13, 10, 21, 10, 11, 18, 21, 24, 25, 8, 17, 10, 25, 16, 21, 22, 19, 24, 23, 22, 29, 18, 27, 24, 35, 22, 9, 18, 33, 40, 39, 42, 37, 32, 31, 24, 41, 34, 37, 46, 35, 24, 33, 42, 43, 28, 27, 24, 41, 44, 37, 32, 37, 30, 39, 32
Offset: 1

Author

Werner D. Sand, Sep 29 2002

Keywords

Comments

Conjecture: p(2n) - 2p(n) < 2n for all n.

Examples

			a(9) = p(18) - 2p(9) - 9 = 61 - 2*23 - 9 = 6.
		

Crossrefs

Cf. A066066.

Programs

Formula

a(n) = A066066(n) - n.

A073046 Write 2*n = p+q (p,q prime), p*q minimal; then a(n) = p*q.

Original entry on oeis.org

4, 9, 15, 21, 35, 33, 39, 65, 51, 57, 95, 69, 115, 161, 87, 93, 155, 217, 111, 185, 123, 129, 215, 141, 235, 329, 159, 265, 371, 177, 183, 305, 427, 201, 335, 213, 219, 365, 511, 237, 395, 249, 415, 581, 267, 445, 623, 1501, 291, 485, 303, 309, 515, 321, 327
Offset: 2

Author

Werner D. Sand, Aug 31 2002

Keywords

Comments

Least semiprime whose sum of prime factors equals 2*n.
Assuming Goldbach's conjecture, a(n) exists for all n >= 2. - David James Sycamore, Jan 08 2019

Examples

			n=13: 2n=26; 26 = 23 + 3 = 19 + 7 = 13 + 13; 23*3 = minimal => p*q = 23*3 = 69.
		

Crossrefs

Programs

  • Haskell
    a073046 n = head $ dropWhile (== 0) $
                       zipWith (*) prims $ map (a061397 . (2*n -)) prims
       where prims = takeWhile (<= n) a000040_list
    -- Reinhard Zumkeller, Aug 28 2011
  • Mathematica
    Array[Block[{p = 2, q}, While[! PrimeQ@ Set[q, 2 # - p], p = NextPrime[p]]; p q] &, 55, 2] (* Michael De Vlieger, Aug 02 2020 *)

Formula

For all n except 3, a(n) = A288814(2*n). - David James Sycamore, Jan 08 2019

Extensions

Corrected by Ray Chandler, Jun 11 2005

A073497 a(n) = n^2 - prime(n).

Original entry on oeis.org

-1, 1, 4, 9, 14, 23, 32, 45, 58, 71, 90, 107, 128, 153, 178, 203, 230, 263, 294, 329, 368, 405, 446, 487, 528, 575, 626, 677, 732, 787, 834, 893, 952, 1017, 1076, 1145, 1212, 1281, 1354, 1427, 1502, 1583, 1658, 1743, 1828, 1917, 1998, 2081, 2174, 2271, 2368
Offset: 1

Author

Werner D. Sand, Aug 27 2002

Keywords

Comments

a(n) is never a perfect square for n>=5. [Proof: assume on the contrary n^2 - prime(n) = k^2, equivalent to (n+k)*(n-k) = prime(n). Since prime(n) cannot be the product of two nontrivial factors, this equation can only hold for k=n-1, i.e., prime(n)=2n-1. This contradicts the assumption and completes the proof.] - Alexander R. Povolotsky, Oct 01 2008

Programs

  • Magma
    [n^2 - NthPrime(n): n in [1..100] ]; // Vincenzo Librandi, Apr 12 2011
  • Mathematica
    Table[n^2 - Prime[n], {n, 1, 55}]
  • PARI
    for(n=1,51,print1(n*n-prime(n),","))
    

Extensions

More terms from Klaus Brockhaus and Robert G. Wilson v, Aug 28 2002