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-20 of 33 results. Next

A104278 Numbers m such that 2m+1 and 2m-1 are not primes.

Original entry on oeis.org

13, 17, 25, 28, 32, 38, 43, 46, 47, 58, 59, 60, 61, 62, 67, 71, 72, 73, 77, 80, 85, 88, 92, 93, 94, 101, 102, 103, 104, 107, 108, 109, 110, 118, 122, 123, 124, 127, 130, 133, 137, 143, 144, 145, 148, 149, 150, 151, 152, 160, 161, 162, 163, 164, 167, 170, 171, 172
Offset: 1

Views

Author

Alexandre Wajnberg, Apr 17 2005

Keywords

Comments

Complement of A147820. - Omar E. Pol, Nov 17 2008
m is in the sequence iff A177961(m)Vladimir Shevelev, May 16 2010

Examples

			a(1)=13 is the first number satisfying simultaneously the two rules.
		

Crossrefs

Intersection of A047845 and A104275.

Programs

  • Haskell
    a104278 n = a104278_list !! (n-1)
    a104278_list = [m | m <- [1..],
                        a010051' (2 * m - 1) == 0 && a010051' (2 * m + 1) == 0]
    -- Reinhard Zumkeller, Aug 04 2015
    
  • Mathematica
    Select[ Range[300], !PrimeQ[2# + 1] && !PrimeQ[2# - 1] &] (* Robert G. Wilson v, Apr 18 2005 *)
    Select[Range[300],NoneTrue[2#+{1,-1},PrimeQ]&] (* The program uses the NoneTrue function from Mathematica version 10 *)  (* Harvey P. Dale, Jul 07 2015 *)
  • PARI
    select( {is_A104278(n)=!isprime(2*n-1)&&!isprime(2*n+1)}, [1..222]) \\ M. F. Hasler, Apr 29 2024

Formula

a(n) = (A025583-1)/2. - Bill McEachen, Feb 05 2025

Extensions

More terms from Robert G. Wilson v, Apr 18 2005

A193773 Number of ways to write n as 2*x*y - x - y with 1 <= x <= y.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 2, 2, 1, 1, 2, 2, 1, 2, 1, 1, 3, 1, 2, 2, 1, 2, 2, 1, 1, 3, 2, 1, 2, 1, 1, 3, 2, 1, 3, 1, 2, 2, 1, 2, 2, 2, 1, 3, 1, 1, 4, 1, 1, 2, 1, 2, 3, 2, 2, 2, 2, 1, 2, 1, 2, 4, 1, 1, 2, 2, 2, 3, 1, 1, 3, 2, 1, 2, 2, 1, 4, 1, 2, 3
Offset: 0

Views

Author

Reinhard Zumkeller, Jan 02 2013

Keywords

Comments

a(A005097(n)) = 1; for n > 1: a(A047845(n)) > 1. - Reinhard Zumkeller, Jan 02 2013
Number of ways to write 2*n+1 as a difference of two squares. Note that 2*(2*x*y - x - y) + 1 = (2*x - 1) * (2*y - 1) = (y + x - 1)^2 - (y - x)^2. - Michael Somos, Dec 23 2018

Examples

			G.f. = 1 + x + x^2 + x^3 + 2*x^4 + x^5 + x^6 + 2*x^7 + x^8 + x^9 + 2*x^10 + ... - _Michael Somos_, Dec 23 2018
		

Crossrefs

Programs

  • Haskell
    a193773 n = length [() | x <- [1 .. n + 1],
                             let (y,m) = divMod (x + n) (2 * x - 1),
                             x <= y, m == 0]
    
  • Mathematica
    a[ n_] := If[ n < 0, 0, Ceiling[ DivisorSigma[0, 2 n + 1] / 2]]; (* Michael Somos, Dec 23 2018 *)
  • PARI
    {a(n) = if(n < 0, 0, (numdiv(2*n+1) + 1)\2)}; /* Michael Somos, Dec 23 2018 */

Formula

a(n) = ceiling(A000005(2*n+1) / 2). - Michael Somos, Dec 23 2018

A153144 Numbers n such that 2*n+19 is not a prime.

Original entry on oeis.org

1, 3, 4, 7, 8, 10, 13, 15, 16, 18, 19, 22, 23, 25, 28, 29, 31, 33, 34, 36, 37, 38, 40, 43, 46, 48, 49, 50, 51, 52, 53, 55, 57, 58, 61, 62, 63, 64, 67, 68, 70, 71, 73, 75, 76, 78, 79, 82, 83, 84, 85, 88, 91, 92, 93, 94, 95, 97, 98, 99, 100, 101
Offset: 1

Views

Author

Vincenzo Librandi, Dec 19 2008

Keywords

Crossrefs

Numbers n such that 2n+k is not prime: A047845 (k=1), A153238 (k=3), A153052 (k=5), A153053 (k=7), A153723 (k=9), A153083 (k=11), A153082 (k=13), A241571 (k=15), A241572 (k=17), this sequence (k=19).

Programs

  • Magma
    [n: n in [1..120] | not IsPrime(2*n + 19)]; // Vincenzo Librandi, Dec 13 2012
  • Mathematica
    Select[Range[0, 500], !PrimeQ[2# + 19] &] (* Vincenzo Librandi, Dec 13 2012 *)

A125713 Smallest odd prime p such that (n+1)^p - n^p is prime.

Original entry on oeis.org

3, 3, 3, 3, 5, 3, 7, 7, 3, 3, 3, 17, 3, 3, 43, 5, 3, 1607, 5, 19, 127, 229, 3, 3, 3, 13, 3, 3, 149, 3, 5, 3, 23, 3, 5, 83, 3, 3, 37, 7, 3, 3, 37, 5, 3, 5, 58543, 3, 3, 7, 29, 3, 479, 5, 3, 19, 5, 3, 4663, 54517, 17, 3, 3, 5, 7, 3, 3, 17, 11, 47, 61, 19, 23, 3, 5, 19, 7, 5, 7, 3, 3
Offset: 1

Views

Author

Alexander Adamchuk, Dec 01 2006, Feb 15 2007

Keywords

Comments

Corresponding smallest primes of the form (n+1)^p - n^p, where p = a(n) is an odd prime, are listed in A121091(n+1) = {7, 19, 37, 61, 4651, 127, 1273609, 2685817, 271, 331, 397, 6431804812640900941, 547, 631, ...}. a(n) = A058013(n) for n = {4, 7, 10, 12, 13, 16, 17, 19, 22, 24, 25, 27, 28, 31, ...} = A047845(n) = (n-1)/2, where n runs through odd nonprimes (A014076), for n>1. a(97) = 7. a(99)..a(112) = {5, 43, 5, 13, 7, 5, 3, 6529, 59, 3, 5, 5, 113, 5}. a(114) = 139. a(117)..a(129) = {7, 13, 3, 5, 5, 7, 3, 5167, 3, 41, 59, 3, 3}. a(131) = 101. a(n) is currently unknown for n = {113, 115, 116, 130, 132, ...}.
a(96) = 1307, a(98) = 709.
a(137) is probably 196873 from a prime of this form discovered by Jean-Louis Charton in December 2009 and reported to Henri Lifchitz's PRP Top. - Robert Price, Feb 17 2012
a(138) through a(150) are 113, >32401, 3, 7, 3, 8839, 5, 7, 13, 3, 5, 271, 13. - Robert Price, Feb 17 2012
a(137) = 196873 confirmed by Fischer link; a(139) > 260000. - Ray Chandler, Feb 26 2017

Crossrefs

Cf. A058013 (smallest prime p such that (n+1)^p - n^p is prime).
Cf. A065913 (smallest prime of form (n+1)^k - n^k).
Cf. A121091 (smallest nexus prime of the form n^p - (n-1)^p, where p is odd prime).
Cf. A062585 (numbers n such that k^n - (k-1)^n is prime, where k is 19).

A266410 a(n) = (A266419(n) - 1) / 2; numbers n such that 2n+1 is a nonludic number (in A192607).

Original entry on oeis.org

4, 7, 9, 10, 13, 15, 16, 17, 19, 22, 24, 25, 27, 28, 29, 31, 32, 34, 36, 37, 39, 40, 42, 43, 46, 47, 49, 50, 51, 52, 54, 55, 56, 58, 61, 62, 64, 66, 67, 68, 69, 70, 72, 73, 75, 76, 77, 79, 81, 82, 83, 84, 85, 88, 91, 92, 93, 94, 95, 97, 98, 99, 100, 101, 102, 103, 106, 107, 108, 109, 112, 114, 115, 118, 120, 121
Offset: 1

Views

Author

Antti Karttunen, Jan 28 2016

Keywords

Comments

Odd nonludic numbers (A266419) decremented by one, then halved.

Crossrefs

Complement: A266409.
Cf. permutations A266418, A266638.
Cf. also A047845.

Formula

a(n) = (A266419(n) - 1) / 2.

A075555 Smallest prime p such that p+n is a square, or 0 if no such p exists.

Original entry on oeis.org

3, 2, 13, 5, 11, 3, 2, 17, 7, 71, 5, 13, 3, 2, 181, 0, 19, 7, 17, 5, 43, 3, 2, 97, 11, 23, 37, 53, 7, 19, 5, 17, 3, 2, 29, 13, 107, 11, 61, 41, 23, 7, 101, 5, 19, 3, 2, 73, 0, 31, 13, 29, 11, 67, 89, 113, 7, 23, 5, 61, 3, 2, 37, 17, 79, 103, 257, 13, 31, 11, 29, 97, 71, 7, 181, 5
Offset: 1

Views

Author

Amarnath Murthy, Sep 23 2002

Keywords

Comments

If n=A047845(i)^2 for some i, i.e. if n has the form ((k-1)/2)^2 with k odd but not prime, then a(n)=0. It is conjectured that these are the only values of n for which a(n)=0; this would follow from Schinzel's hypothesis.

Examples

			a(8) = 17 because 8 + 17 is the first square that can be made by adding a prime to 8.
a(16) = 0 because 16 + p cannot be x^2, since then p = x^2 - 16 = (x-4)(x+4).
		

Crossrefs

Cf. A075556.
a(n) = A105016(n)^2 - n, if a(n) exists.

Programs

  • Mathematica
    a[n_] := If[IntegerQ[s=Sqrt[n]]&&!PrimeQ[2s+1], 0, For[x=Ceiling[s], True, x++, If[PrimeQ[x^2-n], Return[x^2-n]]]]
  • PARI
    for(n=1,100,f=0:forprime(p=2,10^7,if(issquare(p+n),f=p:break)): if(f,print1(f","),print1("0,")))

Extensions

More terms from Ralf Stephan, Mar 28 2003
Edited by Dean Hickerson, Mar 31 2003

A090767 Numbers of the form 3*x*y*z + 2(x*y + y*z + z*x) + (x + y + z) for x, y, z positive integers.

Original entry on oeis.org

12, 20, 28, 33, 36, 44, 46, 52, 54, 59, 60, 64, 68, 72, 75, 76, 82, 84, 85, 92, 96, 98, 100, 104, 105, 108, 111, 116, 117, 118, 124, 128, 132, 133, 136, 137, 138, 140, 144, 148, 150, 151, 154, 156, 159, 162, 163, 164, 170, 172, 174, 176, 180, 184, 188, 189, 190
Offset: 1

Views

Author

John H. Mason, Feb 02 2004

Keywords

Comments

This is the set of numbers which count the unit sticks or unit segments needed to construct a three-dimensional cubic lattice made up from unit cubes. This generalizes the two-dimensional version which is A047845 (numbers of the form 2*x*y + x + y for x and y positive integers) and is also the numbers of sticks needed to construct a rectangular lattice of unit squares.

Examples

			a(1) = 12 because there are 12 edges to a cube.
		

Crossrefs

Cf. A047845.

Programs

  • Maple
    SeqGen1 := proc(n,N) local a,b,c,F,V,v; # n specifies the search space; N specifies the maximal number to appear in the initial segment of the sequence F := 3*x*y*z + 2*(x*y+y*z+z*x)+x+y+z; V := {}; for a from 1 to n do for b from 1 to n do for c from b to n do v := subs(x=a,y=b,F); if v < N then V := V union {v};fi; od;od; sort(V) end:
    # alternative:
    N:= 1000: # to get all terms <= N
    S:= {seq(seq(seq(3*x*y*z + 2*(x*y+y*z+z*x)+(x+y+z),
    z = 1 .. min(y, (-2*x*y+N-x-y)/(3*x*y+2*x+2*y+1))),
    y = 1 .. min(x, (N-3*x-1)/(5*x+3))),
    x = 1 .. (N-4)/8)}:
    sort(convert(S,list)); # Robert Israel, Feb 18 2016
  • Mathematica
    M = 1000;
    S = Table[3 x y z + 2(x y + y z + z x) + (x + y + z), {x, 1, (M - 4)/8}, {y, 1, Min[x, (M - 3 x - 1)/(5 x + 3)]}, {z, 1, Min[y, (-2 x y + M - x - y)/(3 x y + 2 x + 2 y + 1)]}] // Flatten // Union (* Jean-François Alcover, Apr 11 2019, after Robert Israel *)

Extensions

More terms from Ray Chandler, Feb 04 2004

A065824 Smallest solution m to (n+1)*phi(m) = n*sigma(m), or -1 if no solution exists.

Original entry on oeis.org

3, 5, 7, 323, 11, 13, 899, 17, 19, 1763, 23, 5249, 3239, 29, 31, 979801, 5459, 37, 10763, 41, 43, 9179, 47, 9701, 10403, 53, 12319, 5646547, 59, 61, 24569, 19109, 67, 19043, 71, 73, 22499, 50819, 79, 41309, 83, 32639, 46979, 89, 34579, 39059, 125969
Offset: 1

Views

Author

Labos Elemer, Nov 23 2001

Keywords

Comments

If p = a(n) is a prime solution, then (n+1)*(p-1) = n*(p+1) and p = 2n+1, so position for p if it is in fact a minimal solution is at n = (p-1)/2. E.g. 29 appears at 14th position shown by A005097. On the other hand large and (seemingly always composite) solutions arise at indices shown essentially by A047845. Also, differences between the sites of two consecutive small prime solutions appears to be d/2, half the difference between consecutive primes (A001223).

Crossrefs

Programs

  • Mathematica
    max = 10^7; a[n_] := For[m = 3, m <= max, m++, If[(n+1)*EulerPhi[m] == n*DivisorSigma[1, m], Print[m]; Return[m]]] /. Null -> -1; Array[a, 50] (* Jean-François Alcover, Oct 08 2016 *)
  • Python
    from itertools import count
    from math import prod
    from sympy import factorint
    def A065824(n):
        for m in count(1):
            f = factorint(m)
            if (n+1)*m*prod((p-1)**2 for p in f)==n*prod(p**(e+2)-p for p,e in f.items()):
                return m # Chai Wah Wu, Aug 12 2024

Formula

(n+1)*A000010(a(n)) = n*A000203(a(n)), smallest x=a(n) solutions.

A121091 Smallest nexus prime of the form n^p - (n-1)^p, where p is an odd prime.

Original entry on oeis.org

7, 19, 37, 61, 4651, 127, 1273609, 2685817, 271, 331, 397, 6431804812640900941, 547, 631, 5613125740675652943160572913465695837595324940170321, 371281, 919
Offset: 2

Views

Author

Alexander Adamchuk, Aug 11 2006, revised Dec 01 2006, Feb 15 2007

Keywords

Comments

a(19) = 19^1607 - 18^1607, which is too large to include. It has 2055 decimal digits. See A062585(1) = 1607.
a(20)-a(21) = {723901, 8005616640331026125580781}. a(n) is currently known for all n up to n = 96. Corresponding smallest odd primes p such that (n+1)^p - n^p is prime are listed in A125713(n) = {3,3,3,3,5,3,7,7,3,3,3,17,3,3,43,5,3,10957,5,19,127,229,3,3,3,13,3,3,149,3,5,3,23,3,5,83,3,3,37,7,3,3,37,5,3,5,58543,...}. a(n+1) = A065013(n) for n = {4, 7, 10, 12, 13, 16, 17, 19, 22, 24, 25, 27, 28, 31, ...} = A047845(n) = (n-1)/2, where n runs through odd nonprimes (A014076), for n>1.

Crossrefs

Cf. A125713 = Smallest odd prime p such that (n+1)^p - n^p is prime. Cf. A065913 = Smallest prime of form (n+1)^k - n^k. Cf. A058013 = Smallest prime p such that (n+1)^p - n^p is prime. Cf. A047845, A014076.
Cf. A062585 = numbers n such that k^n - (k-1)^n is prime, where k is 19. Cf. A000043, A057468, A059801, A059802, A062572-A062666.

Formula

a(n) = n^A125713(n) - (n-1)^A125713(n).

A286680 Smallest nonnegative m such that (1 + n)^(2^m) + n is not prime.

Original entry on oeis.org

0, 5, 4, 2, 0, 3, 1, 0, 3, 3, 0, 1, 0, 0, 2, 4, 0, 0, 2, 0, 2, 1, 0, 2, 0, 0, 1, 0, 0, 2, 3, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 2, 0, 0, 0, 1, 0, 1, 1, 0, 3, 2, 0, 1, 0, 0, 0, 0, 0, 0, 2, 0, 2, 0, 0, 1, 2, 0, 0, 0, 0, 1, 2, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 2
Offset: 0

Views

Author

Juri-Stepan Gerasimov, May 12 2017

Keywords

Comments

Nonprimes: 1, 4294967297, 43046723, 259, 9, 1679621, 55, 15, 43046729, 100000009, 21, 155, 25, 27, 50639, 18446744073709551631, 33, 35, ...
Conjecture: a(n) <= 6 for all n.
This conjecture would contradict the generalized Bunyakovsky conjecture. That is, the polynomials (1+n)^k+n for k=0..6 satisfy the conditions for that conjecture, and so there should be some n for which all seven are prime. - Robert Israel, May 17 2017
Smallest k such that (1 + k)^(2^n) + k is not prime: 0, 6, 3, 5, 2, 1, 54131988 (conjecturally finite). Last term found by Robert G. Wilson v, May 14 2017
From Robert G. Wilson v, May 18 2017: (Start)
m=
0: 0, 4, 7, 10, 12, 13, 16, 17, 19, 22, 24, 25, 27, 28, 31, 32, 34, 37, 38, etc.;
1: 6, 11, 21, 26, 33, 35, 36, 39, 41, 48, 50, 51, 56, 68, 74, 78, 81, 83, etc.;
2: 3, 14, 18, 20, 23, 29, 44, 54, 63, 65, 69, 75, 95, 99, 113, 114, 125, etc.;
3: 5, 8, 9, 30, 53, 119, 230, 308, 329, 350, 624, 638, 779, 785, 813, 1110, etc.;
4: 2, 15, 2100, 4223, 4773, 7868, 8744, 9339, 9540, 13178, 14589, 15884, etc.;
5: 1, 1432578, 1627035, 1737054, 1888094, 1959638, 2176139, 3172304, 3425069, etc.;
6: 54131988, 177386619, 229940778, 846372674, 2124404844, 2367307088, 2539775055, etc.;
(End)

Examples

			a(0) = 0 because (1 + 0)^(2^0) + 0 = 1 is not prime.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local k;
      for k from 0 while isprime((1+n)^(2^k)+n) do od:
      k;
    end proc:
    map(f, [$0..100]); # Robert Israel, May 17 2017
  • Mathematica
    f[n_] := Block[{k = 0}, While[ PrimeQ[(1 + n)^(2^k) + n], k++]; k]; Array[f, 105, 0] (* Robert G. Wilson v, May 14 2017 *)
  • PARI
    a(n) = {my(m = 0); while (isprime((1 + n)^(2^m) + n), m++); m;} \\ Michel Marcus, May 19 2017
Previous Showing 11-20 of 33 results. Next