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: K. D. Bajpai

K. D. Bajpai's wiki page.

K. D. Bajpai has authored 398 sequences. Here are the ten most recent ones:

A344780 Semiprimes that are product of two distinct Honaker primes.

Original entry on oeis.org

34453, 59867, 120191, 136109, 137419, 142921, 170431, 178291, 187723, 205801, 250603, 253223, 273257, 275887, 280471, 286933, 290951, 297763, 319771, 339421, 342163, 348853, 354617, 356189, 357499, 357943, 367193, 376879, 401777, 410947, 413173, 422999, 449723
Offset: 1

Author

K. D. Bajpai, May 28 2021

Keywords

Comments

Subsequence of A006881.
a(1) = 34453 is the only number <= 5*10^6 that is a triangular number.

Examples

			34453 = 131*263 which are distinct Honaker primes.
120191 = 263*457 which are distinct Honaker primes.
		

Crossrefs

Programs

  • Maple
    isA006881 := proc(n)
        if numtheory[bigomega](n) =2 and A001221(n) = 2 then
            true ;
        else
            false ;
        end if;
    end proc:
    isA344780 := proc(n)
        if isA006881(n) then
            for p in ifactors(n)[2] do
                if not isA033548(op(1,p)) then
                    return false;
                end if;
            end do:
            true ;
        else
            false;
        end if;
    end proc:
    for n from 1  do
        if isA344780(n) then
            printf("%d,\n",n);
        end if;
    end do: # R. J. Mathar, Jul 07 2021
  • Mathematica
    fHQ[n_] := Plus @@ IntegerDigits@n == Plus @@ IntegerDigits@PrimePi@n;
    lst = {}; Do[If[Plus @@ Last /@ FactorInteger[n] == 2, a = Length[First /@ FactorInteger[n]]; If[a == 2, b = First /@ FactorInteger[n]; c = b[[1]]; d = b[[2]]; If[fHQ[c] && fHQ[d], AppendTo[lst, {n,c,d}]]]], {n, 2000000}]; lst

A343192 Happy Honaker primes.

Original entry on oeis.org

263, 1039, 1933, 2221, 3067, 3137, 5741, 6343, 6353, 6971, 7481, 8821, 9103, 10247, 11251, 12347, 13037, 13339, 13457, 13933, 14437, 16451, 17317, 18041, 21617, 26309, 26339, 30091, 30293, 31177, 32009, 34471, 35227, 36307, 36433, 37117, 41131, 41333, 41801, 43781
Offset: 1

Author

K. D. Bajpai, Apr 07 2021

Keywords

Comments

Intersection of A033548 and A035497 or A007770.

Examples

			263 is a Honaker prime: the number of primes up to 263 is 56 and 2 + 6 + 3 = 11 = 5 + 6. 263 is also a Happy number: iterating the sum of squares of digits terminates in 1, i.e., 263 -> 4 + 36 + 9 = 49 -> 16 + 81 = 97 -> 81 + 49 = 130 -> 1 + 9 + 0 = 10 -> 1 + 0 = 1. Thus 263 is a Happy Honaker prime.
		

Crossrefs

Programs

  • Mathematica
    Select[Prime[Range[20000]], FixedPoint[Total[IntegerDigits[#]^2] &, #, 10] == 1 && Plus @@ IntegerDigits@# == Plus @@ IntegerDigits@PrimePi@# &]

A343139 Numbers k that satisfy the condition digitsum(k) = digitsum(pi(k)) where pi is the prime counting function.

Original entry on oeis.org

15, 27, 51, 63, 120, 130, 131, 142, 153, 164, 208, 218, 230, 242, 252, 262, 263, 274, 305, 318, 327, 338, 348, 360, 370, 381, 392, 413, 424, 435, 446, 456, 457, 702, 712, 722, 732, 805, 860, 901, 912, 922, 932, 1016, 1027, 1038, 1039, 1048, 1049, 1059, 1071, 1080
Offset: 1

Author

K. D. Bajpai, Apr 06 2021

Keywords

Comments

a(7) = 131 is the first prime in this sequence.
A033548 (Honaker primes) is a subsequence of this sequence.

Examples

			153 is a term because the number of primes up to 153 is 36 and 1 + 5 + 3 = 9 = 3 + 6.
435 is a term because number of primes up to 435 is 84 and 4 + 3 + 5 = 12 = 8 + 4.
		

Crossrefs

Programs

  • Mathematica
    fHQ[n_] := Plus @@ IntegerDigits@n == Plus @@ IntegerDigits@PrimePi@n; Select[Range[3000], fHQ[#] &]
  • PARI
    for(n=1, 5000, if(sumdigits(n)==vecsum(digits(primepi(n))), print1(n, ", " )));
    
  • PARI
    upto(n) = { my(q = 2, ulim = nextprime(n), pi = 0, res = List()); forprime(p = 3, ulim, pi++; for(i = q, p-1, if(sumdigits(i) == sumdigits(pi), listput(res, i) ) ); q = p ); res } \\ David A. Corneth, May 26 2021
    
  • Python
    from sympy import primepi
    def sd(n): return sum(map(int, str(n)))
    def ok(n): return sd(n) == sd(primepi(n))
    print(list(filter(ok, range(1, 1081)))) # Michael S. Branicky, May 28 2021

A337491 Numbers k such that exactly one of 2*k + 3 and 4*k + 3 is prime.

Original entry on oeis.org

8, 11, 13, 16, 22, 26, 28, 29, 31, 35, 37, 38, 41, 43, 44, 50, 53, 56, 59, 64, 65, 68, 70, 73, 74, 76, 80, 85, 86, 88, 91, 97, 98, 107, 109, 112, 113, 116, 118, 121, 122, 125, 127, 133, 134, 136, 137, 139, 142, 145, 146, 149, 151, 152, 155, 160, 161, 167, 170
Offset: 1

Author

K. D. Bajpai, Aug 29 2020

Keywords

Comments

Integers that are in A067076 or in A095278, but not in both. - Michel Marcus, Aug 29 2020

Examples

			a(1) = 8 is a term because 2*8 + 3 = 19 is a prime; but 4*8 + 3 = 35 = (5*7) is a composite number.
a(4) = 16 is a term because 2*16 + 3 = 35 = (5*7) is a composite number; but 4*16 + 3 = 67  is a prime.
a(6) = 26 is a term because 2*26 + 3 = 55 = (5*11) is a composite number; but 4*26 + 3 = 107  is a prime.
		

Crossrefs

Programs

  • Maple
    A337491:=n->`if`((isprime(2*n+3) xor isprime(4*n+3)), n, NULL): seq(A337491(n), n=1..500);
  • Mathematica
    Select[Range[0, 250], Xor[PrimeQ[2 # + 3], PrimeQ[4 # + 3]] &]
    Select[Range[200],Total[Boole[PrimeQ[{2,4}#+3]]]==1&] (* Harvey P. Dale, Jan 26 2023 *)
  • PARI
    isok(k) = bitxor(isprime(2*k+3), isprime(4*k+3)); \\ Michel Marcus, Aug 29 2020

A337480 Numbers k such that exactly one of 6*k + 5 and 12*k + 5 is prime.

Original entry on oeis.org

6, 12, 13, 17, 18, 19, 23, 26, 27, 28, 31, 33, 39, 41, 44, 47, 48, 49, 52, 53, 54, 56, 57, 59, 67, 68, 69, 74, 76, 78, 83, 86, 87, 88, 91, 93, 94, 97, 101, 109, 112, 114, 116, 117, 124, 126, 128, 129, 132, 133, 137, 139, 141, 144, 146, 147, 151, 154, 159, 161
Offset: 1

Author

K. D. Bajpai, Aug 28 2020

Keywords

Examples

			a(5) = 18 is a term because 6*18 + 5 = 113 is prime; but 12*18 + 5 = 221 = (13*17) is a composite number.
a(8) = 26 is a term because 6*26 + 5 = 161 = (7*23) is a composite number; but 12*26 + 5 = 317 is prime.
		

Crossrefs

Programs

  • Maple
    A337480:=k->`if`(isprime(6*k+5) xor isprime(12*k+5),k, NULL): seq(A337480(k), k=1..1000);
  • Mathematica
    Select[Range[0, 250], Xor[PrimeQ[6 # + 5], PrimeQ[12 # + 5]] &]
  • PARI
    for(k=1, 1000, if (bitxor(isprime(6*k+5), isprime(12*k+5)), print1(k, ", ")));

A331203 Numbers k such that k/(digsum(k)) is an integer cube.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 72, 243, 320, 486, 512, 640, 704, 832, 960, 1000, 1088, 1125, 2000, 2401, 3000, 3430, 4000, 4116, 4802, 5000, 5145, 5831, 6000, 6174, 6517, 6860, 7000, 7546, 8000, 8575, 8918, 9000, 9216, 9947, 19683, 35152, 35937, 41743, 43940, 46137
Offset: 1

Author

K. D. Bajpai, Jan 12 2020

Keywords

Comments

If m belongs to the sequence, then 1000*m also belongs to the sequence. - Rémy Sigrist, Jan 12 2020

Examples

			a(11) = 243: 243/(2 + 4 + 3) = 27 = 3^3.
a(12) = 320: 320/(3 + 2 + 0) = 64 = 4^3.
		

Crossrefs

Programs

  • Magma
    [n : n in[1 .. 1000] | IsIntegral((n/(&+Intseq(n)))^(1/3))];
    
  • Mathematica
    Select[Range[100000], IntegerQ[CubeRoot[#/Total[IntegerDigits[#]]]] &]
  • PARI
    is(n) = my (k=n/sumdigits(n)); type(k)==type(42) && ispower(k,3) \\ Rémy Sigrist, Jan 12 2020

A331346 Primes using all the square digits {0, 1, 4, 9} and no others.

Original entry on oeis.org

1049, 1409, 4019, 4091, 9041, 10499, 10949, 14009, 49019, 49109, 90149, 90401, 94109, 99041, 99401, 100049, 101149, 101419, 101449, 104009, 104119, 104149, 104491, 104911, 104999, 109049, 109141, 109441, 110419, 110491, 111049, 111409, 114901, 140009, 140191, 140419
Offset: 1

Author

K. D. Bajpai, Jan 14 2020

Keywords

Comments

Subsequence of A061246.

Examples

			a(1) = 1049 is prime containing all the square digits (0, 1, 4, 9) and no others.
a(2) = 1409 is prime containing all the square digits (0, 1, 4, 9) and no others.
		

Crossrefs

Programs

  • Magma
    [p:p in PrimesUpTo(150000)|Set(Intseq(p)) eq {0,1,4,9}]; // Marius A. Burtea, Jan 14 2020
  • Maple
    f:= proc(n) local L,x;
      L:= convert(n,base,4);
      if convert(L,set) <> {0,1,2,3} then return NULL fi;
      L:= subs(2=4,3=9,L);
      x:= add(L[i]*10^(i-1),i=1..nops(L));
      if isprime(x) then x else NULL fi
    end proc:
    map(f, [$4^3..4^6]); # Robert Israel, Jan 16 2020
  • Mathematica
    Select[FromDigits /@ Tuples[{0, 1, 4, 9}, 6], PrimeQ[#] && Union[IntegerDigits[#]] == {0, 1, 4, 9} &]

A330438 Numbers k such that k^2-2 and k^3-2 are prime.

Original entry on oeis.org

9, 15, 19, 27, 37, 121, 135, 145, 211, 217, 259, 265, 267, 279, 355, 357, 387, 391, 435, 489, 525, 561, 615, 621, 727, 951, 987, 1029, 1119, 1141, 1177, 1251, 1287, 1357, 1435, 1491, 1561, 1617, 1717, 1785, 1819, 1839, 1875, 1909, 1989, 2001, 2077, 2107, 2211
Offset: 1

Author

K. D. Bajpai, Dec 14 2019

Keywords

Comments

Intersection of A028870 and A038599.

Examples

			a(1) = 9: 9^2 - 2 = 79; 9^3 - 2 = 727; both results are prime.
a(2) = 15: 15^2 - 2 = 223; 15^3 - 2 = 3373; both results are prime.
		

Crossrefs

Programs

  • Magma
    [n : n in [1 .. 100] | IsPrime (n^2 - 2) and IsPrime (n^3 - 2)];
  • Maple
    filter:= k -> isprime(k^2-2) and isprime(k^3-2):
    select(filter, [$2..10000]); # Robert Israel, Dec 24 2019
  • Mathematica
    Select[Range[10000], PrimeQ[#^3 - 2] && PrimeQ[#^2 - 2] &]

A330508 Numbers k such that k + 6^t is semiprime for t = 0 to 9.

Original entry on oeis.org

61273, 109441, 160213, 274501, 275473, 311593, 360673, 394201, 477181, 486061, 514993, 522085, 617137, 620053, 715477, 725485, 803833, 812677, 847117, 1063585, 1146913, 1182577, 1215865, 1232917, 1409425, 1508113, 1587241, 1768993, 1863073, 1895413, 2085517, 2095177
Offset: 1

Author

K. D. Bajpai, Dec 16 2019

Keywords

Comments

a(2620) = 530079693 is the first multiple of 3 in this sequence; there are no multiples of 2. - Charles R Greathouse IV, Dec 20 2019

Examples

			a(1) = 61273:
  61273 + 6^0  =    61274 =   2 *  30637;
  61273 + 6^1  =    61279 = 233 *    263;
  61273 + 6^2  =    61309 =  37 *   1657;
  61273 + 6^3  =    61489 =  17 *   3617;
  61273 + 6^4  =    62569 =  13 *   4813;
  61273 + 6^5  =    69049 =  29 *   2381;
  61273 + 6^6  =   107929 =  37 *   2917;
  61273 + 6^7  =   341209 =  11 *  31019;
  61273 + 6^8  =  1740889 = 197 *   8837;
  61273 + 6^9  = 10138969 =  89 * 113921;
all ten results are semiprime.
		

Crossrefs

Subsequence of A076274.

Programs

  • Magma
    f:=func; [k:k in [1..2100000]|forall{m:m in [0..9]|f(k+6^m)}]; // Marius A. Burtea, Dec 20 2019
    
  • Mathematica
    fX[n_] = PrimeOmega[n] == 2; Select[Range[2000000], AllTrue[# + 6^{0, 1, 2, 3, 4, 5, 6, 7, 8, 9}, fX] &]
  • PARI
    issemi(n)=bigomega(n)==2
    is(n)=for(t=0,9, if(!issemi(n+6^t), return(0))); 1 \\ Charles R Greathouse IV, Dec 20 2019

A329727 Numbers k such that k^3 +- 2 and k +- 2 are prime.

Original entry on oeis.org

129, 1491, 1875, 2709, 5655, 6969, 10335, 14325, 14421, 17319, 26559, 35109, 37509, 43719, 50229, 52629, 101871, 102795, 104325, 105501, 120429, 127599, 132699, 136395, 137829, 157521, 172425, 173685, 179481, 186189, 191829, 211371, 219681, 221199, 229215, 234195
Offset: 1

Author

K. D. Bajpai, Nov 19 2019

Keywords

Comments

All terms in this sequence are divisible by 3.

Examples

			a(1) = 129:
  129^3 + 2 = 2146691;
  129^3 - 2 = 2146687;
  129   + 2 =     131;
  129   - 2 =     127; all four results are prime.
a(2) = 1491:
  1491^3 + 2 = 3314613773;
  1491^3 - 2 = 3314613769;
  1491   + 2 =       1493;
  1491   - 2 =       1489; all four results are prime.
		

Crossrefs

Intersection of A038599, A067200, and A087679.

Programs

  • Magma
    [k:k in [1..250000]|forall{m:m in [-2,2]|IsPrime(k+m) and IsPrime(k^3+m)}]; // Marius A. Burtea, Nov 20 2019
    
  • Mathematica
    Select[Range[500000], PrimeQ[#^3 + 2] && PrimeQ[#^3 - 2] && PrimeQ[# + 2] && PrimeQ[# - 2] &]
  • PARI
    isok(k) = isprime(k-2) && isprime(k+2) && isprime(k^3-2) && isprime(k^3+2); \\ Michel Marcus, Nov 24 2019
    
  • PARI
    list(lim)=my(v=List(),p=127,k); forprime(q=131,lim+2,if(q-p==4 && isprime((k=p+2)^3-2) && isprime(k^3+2), listput(v,k)); p=q); Vec(v) \\ Charles R Greathouse IV, May 06 2020