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: Kyle D. Balliet

Kyle D. Balliet's wiki page.

Kyle D. Balliet has authored 13 sequences. Here are the ten most recent ones:

A157676 Numbers n such that n + (product of digits of n) is prime.

Original entry on oeis.org

1, 21, 23, 27, 29, 61, 67, 81, 83, 101, 103, 107, 109, 161, 163, 169, 233, 239, 253, 259, 283, 289, 293, 299, 307, 329, 341, 343, 347, 349, 361, 401, 409, 431, 437, 439, 441, 443, 449, 471, 473, 477, 493, 499, 503, 509, 529, 563, 569, 601, 607, 611, 613, 617
Offset: 1

Author

Kyle D. Balliet, Mar 04 2009

Keywords

Examples

			a(21) = 21 + (2)(1) = 23 (prime). a(67) = 67 + (6)(7) = 109 (prime). a(169) = 169 + (1)(6)(9) = 223 (prime).
		

Crossrefs

Programs

  • Mathematica
    fQ[n_] := PrimeQ[n + Times @@ IntegerDigits@n]; Select[ Range@1000, fQ@# &] (* Robert G. Wilson v, May 04 2009 *)
  • PARI
    dprod(n)=n=digits(n);prod(i=1,#n,n[i])
    is(n)=isprime(dprod(n)+n) \\ Charles R Greathouse IV, Dec 27 2013

Formula

a(n) ~ n log n. - Charles R Greathouse IV, Dec 27 2013

Extensions

More terms from Robert G. Wilson v, May 04 2009

A157678 Numbers k such that k + floor(average of digits of k) is prime.

Original entry on oeis.org

1, 12, 16, 27, 30, 34, 38, 41, 56, 63, 67, 70, 74, 89, 92, 96, 101, 102, 105, 107, 112, 125, 128, 130, 136, 146, 147, 154, 161, 164, 168, 175, 186, 188, 190, 193, 208, 210, 219, 226, 229, 231, 236, 237, 247, 254, 258, 265, 273, 276, 278, 280, 290, 305, 308, 309
Offset: 1

Author

Kyle D. Balliet, Mar 04 2009

Keywords

Examples

			n = 89 -> 89 + floor((8+9)/2) = 89 + 8 = 97 (prime).
n = 190 -> 190 + floor((1+9+0)/3) = 190 + 3 = 193 (prime).
		

Crossrefs

Cf. A172367.

Programs

  • Maple
    a := proc (n) local nn: nn := convert(n, base, 10): if isprime(n+floor(add(nn[j], j = 1 .. nops(nn))/nops(nn))) = true then n else end if end proc: seq(a(n), n = 1 .. 350); # Emeric Deutsch, Mar 07 2009
  • PARI
    is(n)=isprime(sumdigits(n)\#digits(n)+n) \\ Charles R Greathouse IV, Dec 27 2013

Extensions

Corrected and extended by Emeric Deutsch, Mar 07 2009

A157677 Primes p such that p + (product of digits of p) is also prime.

Original entry on oeis.org

23, 29, 61, 67, 83, 101, 103, 107, 109, 163, 233, 239, 283, 293, 307, 347, 349, 401, 409, 431, 439, 443, 449, 499, 503, 509, 563, 569, 601, 607, 613, 617, 619, 653, 659, 677, 683, 701, 709, 743, 809, 907, 929, 941, 1009, 1013, 1019, 1021, 1031, 1033, 1039
Offset: 1

Author

Kyle D. Balliet, Mar 04 2009

Keywords

Comments

If p contains a zero, then p is trivially a member.

Examples

			83 is prime, and 83 + 8*3 = 89 which is also prime. 103 is prime, and 103 + 1*0*3 = 103 is also prime. Thus 89 and 103 are members.
		

Crossrefs

Union of A092518 and A056709.
Cf. A225303.

Programs

  • Maple
    a := proc (n) local nn: nn := convert(ithprime(n), base, 10): if isprime(ithprime(n)+product(nn[j], j = 1 .. nops(nn))) = true then ithprime(n) else end if end proc: seq(a(n), n = 1 .. 180); # Emeric Deutsch, Mar 08 2009
  • Mathematica
    Select[Prime[Range[175]], PrimeQ[# + Times @@ IntegerDigits[#]] &] (* Jayanta Basu, Apr 22 2013 *)
  • PARI
    dprod(n)=n=digits(n); prod(i=1,#n,n[i])
    is(n)=isprime(n) && isprime(n+dprod(n)) \\ Charles R Greathouse IV, Dec 27 2013

Formula

a(n) ~ n log n. - Charles R Greathouse IV, Apr 22 2013

Extensions

More terms from Emeric Deutsch, Mar 08 2009

A157681 Fibonacci sequence beginning 29, 31.

Original entry on oeis.org

29, 31, 60, 91, 151, 242, 393, 635, 1028, 1663, 2691, 4354, 7045, 11399, 18444, 29843, 48287, 78130, 126417, 204547, 330964, 535511, 866475, 1401986, 2268461, 3670447, 5938908, 9609355, 15548263, 25157618, 40705881, 65863499, 106569380
Offset: 1

Author

Kyle D. Balliet, Mar 04 2009

Keywords

Programs

  • GAP
    List([1..40], n -> 27*Fibonacci(n)+2*Fibonacci(n+1)); # G. C. Greubel, Nov 17 2018
  • Magma
    [27*Fibonacci(n) + 2*Fibonacci(n+1): n in [1..40]]; // G. C. Greubel, Nov 17 2018
    
  • Mathematica
    LinearRecurrence[{1,1},{29,31},40] (* Harvey P. Dale, Dec 05 2014 *)
    Table[27*Fibonacci[n] +2*Fibonacci[n+1], {n, 1, 40}] (* G. C. Greubel, Nov 17 2018 *)
  • PARI
    vector(40, n, 27*fibonacci(n) + 2*fibonacci(n+1)) \\ G. C. Greubel, Nov 17 2018
    
  • Sage
    [27*fibonacci(n)+2*fibonacci(n+1) for n in (1..10)] # G. C. Greubel, Nov 17 2018
    

Formula

a(n) = a(n-1) + a(n-2), a(0)=29, a(1)=31.
From G. C. Greubel, Nov 17 2018: (Start)
a(n) = 27*Fibonacci(n) + 2*Fibonacci(n+1).
G.f.: x*(29+2*x)/(1-x-x^2). (End)

A157834 Numbers n such that 3n-2 and 3n+2 are both prime.

Original entry on oeis.org

3, 5, 7, 13, 15, 23, 27, 33, 35, 37, 43, 55, 65, 75, 77, 93, 103, 105, 117, 127, 133, 147, 153, 155, 163, 167, 205, 215, 225, 247, 253, 257, 275, 285, 287, 293, 295, 303, 313, 323, 337, 363, 365, 405, 427, 433, 435, 475, 477, 483, 495, 497, 517
Offset: 1

Author

Kyle D. Balliet, Mar 07 2009

Keywords

Comments

Barycenter of cousin primes (A029708; see also A029710, A023200, A046132), divided by 3. When p>3 and p+4 both are prime, then p = 1 (mod 6) and p+2 = 3 (mod 6). - M. F. Hasler, Jan 14 2013

Examples

			15*3 +/- 2 = 43,47 (both prime).
		

Crossrefs

Intersection of A024893 and A153183.

Programs

  • Magma
    [n: n in [1..1000]|IsPrime(3*n-2)and IsPrime(3*n+2)] // Vincenzo Librandi, Dec 13 2010
  • Maple
    select(t -> isprime(3*t+2) and isprime(3*t-2), [seq(t,t=3..1000,2)]); # Robert Israel, May 28 2017
  • Mathematica
    Select[Range[600],AllTrue[3#+{2,-2},PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Feb 03 2019 *)

Formula

Intersection of A024893 and A153183.
a(n) = A029708(n)/3. - Zak Seidov, Aug 07 2009
a(n) = A056956(n)*2+1 = (A029710(n)+2)/3 = (A023200(n+1)+2)/3. - M. F. Hasler, Jan 14 2013

A157932 Numbers k such that (3^(35*k) + 5^(21*k) + 7^(15*k)) mod 105 is prime.

Original entry on oeis.org

0, 4, 6, 8, 12, 16, 18, 20, 24, 28, 30, 32, 36, 40, 42, 44, 48, 52, 54, 56, 60, 64, 66, 68, 72, 76, 78, 80, 84, 88, 90, 92, 96, 100, 102, 104, 108, 112, 114, 116, 120, 124, 126, 128, 132, 136, 138, 140, 144, 148, 150, 152, 156, 160, 162, 164, 168, 172, 174
Offset: 1

Author

Kyle D. Balliet, Mar 09 2009

Keywords

Comments

Let b(k) = (3^(35*k) + 5^(21*k) + 7^(15*k)) mod 105, then sequence {b(k)} is 3, repeat (60, 68, 75, 17, 30, 23, 60, 47, 75, 38, 30, 2), with primes 3, 17, 23, 47, 2. First differences of {a(n)} are 4, 2, 2, 4, 4, 2, 2, 4, .... - Michel Marcus, Aug 15 2013
3^(35*k) + 5^(21*k) + 7^(15*k) = (4^k)*(3^k + 5^k + 7^k) mod 105, then by the division algorithm a simple proof yields that only numbers k of the form 24*m, 24*m+4, 24*m+6, 24*m+8, 24*m+12, 24*m+16, 24*m+18, 24*m+20 will be congruent to a prime modulo 105. Thus the pattern 4, 2, 2, 4, 4, 2, 2, ... will repeat infinitely. - Kyle D. Balliet, Jan 01 2014
Even numbers that can be written as the sum of 3 of their divisors, not necessarily distinct (see A355200). Also, numbers k of the form 12*m, 12*m+4, 12*m+6, 12*m+8. - Bernard Schott, Sep 08 2023

Examples

			a(4) = 3^(35*4) + 5^(21*4) + 7^(15*4) mod 105 = 17 (prime).
		

Crossrefs

Equals {0} Union (A355200 \ A016945) <=> subsequence of even terms in A355200.

Programs

  • Mathematica
    Select[Range[0,180],PrimeQ[Mod[3^(35#)+5^(21#)+7^(15#),105]]&] (* Harvey P. Dale, Oct 10 2017 *)
  • PARI
    isok(n) = isprime((3^(35*n)+5^(21*n)+7^(15*n)) % 105); \\ Michel Marcus, Aug 15 2013
    
  • PARI
    a(n)=n\4*12+[-4,0,4,6][n%4+1] \\ Charles R Greathouse IV, Dec 27 2013
    
  • PARI
    is(n)=n%=12;n==0||n==4||n==6||n==8 \\ Charles R Greathouse IV, Dec 27 2013
    
  • PARI
    a(n) = (-6-(-I)^n-I^n+6*n)/2 \\ Colin Barker, Oct 19 2015
    
  • PARI
    concat(0, Vec(2*x^2*(2*x^2-x+2)/((x-1)^2*(x^2+1)) + O(x^100))) \\ Colin Barker, Oct 19 2015

Formula

3n - 4 <= a(n) <= 3n - 2. - Charles R Greathouse IV, Dec 27 2013
From Colin Barker, Oct 19 2015: (Start)
a(n) = (-6 - (-i)^n - i^n + 6*n)/2, where i = sqrt(-1).
G.f.: 2*x^2*(2*x^2-x+2) / ((x-1)^2*(x^2+1)). (End)

Extensions

More terms from Michel Marcus, Aug 15 2013

A157833 Numbers k such that 1 + Sum_{j=0..k} (-1)^j*(k-j)! is prime.

Original entry on oeis.org

2, 3, 5, 7, 15, 19, 41, 59, 61, 105, 661, 2653, 3069, 3943, 4053, 8275
Offset: 1

Author

Kyle D. Balliet, Mar 07 2009

Keywords

Comments

Note that when k is even, 3 divides the sum.
The sums corresponding to terms >= 661 are only probable primes. - Klaus Brockhaus, Mar 13 2009

Examples

			a(2) = ((-1)^0)(2-0)! + ((-1)^1)(2-1)! + ((-1)^2)(2-2)! + 1 = 2! - 1! + 0! + 1 = 3 (prime).
		

Extensions

a(7)-a(15) from Klaus Brockhaus, Mar 13 2009
a(16) from Michael S. Branicky, Aug 30 2024

A157829 Numbers k such that k! - (k-1)! + (k-2)! + 1 is prime.

Original entry on oeis.org

2, 5, 7, 11, 13, 16, 22, 29, 43, 56, 67, 83, 85, 107, 317, 325, 517, 1660, 2010, 2368, 4483, 4697, 14524
Offset: 1

Author

Kyle D. Balliet, Mar 07 2009

Keywords

Examples

			a(11) = 11! - 10! + 9! + 1 = 36650881 (prime).
a(16) = 16! - 15! + 14! + 1 = 19702293811201 (prime).
		

Programs

  • Maple
    a := proc (n) if isprime(factorial(n-2)*((n-1)^2+1)+1) = true then n else end if end proc: seq(a(n), n = 2 .. 700); # Emeric Deutsch, Mar 18 2009
  • PARI
    is(n)=ispseudoprime(1+(n^2-2*n+2)*(n-2)!) \\ Charles R Greathouse IV, Dec 27 2013
    
  • PFGW
    ABC2 $a!-($a-1)!+($a-2)!+1
    a: from 2 to 10000
    Charles R Greathouse IV, Dec 27 2013

Extensions

More terms from Emeric Deutsch, Mar 18 2009
a(18)-a(22) from Charles R Greathouse IV, Dec 27 2013
a(23) from Michael S. Branicky, Jan 04 2025

A157202 Numbers k such that 66*k + 5 is prime.

Original entry on oeis.org

0, 1, 2, 4, 6, 7, 9, 12, 13, 14, 16, 18, 19, 23, 26, 27, 36, 37, 39, 41, 42, 43, 44, 46, 51, 56, 57, 58, 64, 68, 71, 74, 76, 77, 78, 81, 82, 83, 88, 89, 91, 93, 98, 102, 103, 104, 106, 111, 114, 117, 118, 123, 127, 133, 134, 141, 142, 149, 152, 153, 154, 156, 158, 159, 161
Offset: 1

Author

Kyle D. Balliet, Feb 25 2009

Keywords

Examples

			23 is a term because 66*23 + 5 = 1523 is prime.
		

Crossrefs

Cf. A142052 (the corresponding primes).

Programs

Extensions

Offset changed to 1 by Georg Fischer, Sep 27 2022

A157194 Fibonacci sequence beginning 41, 43.

Original entry on oeis.org

41, 43, 84, 127, 211, 338, 549, 887, 1436, 2323, 3759, 6082, 9841, 15923, 25764, 41687, 67451, 109138, 176589, 285727, 462316, 748043, 1210359, 1958402, 3168761, 5127163, 8295924, 13423087, 21719011, 35142098, 56861109, 92003207, 148864316
Offset: 0

Author

Kyle D. Balliet, Feb 24 2009

Keywords

Formula

a(n) = a(n-1) + a(n-2), a(0)=41, a(1)=43.