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 21-30 of 30 results.

A174924 Semiprimes sp(k) = q * r such that sum of digits of sp(k) equals sum of digits of the semiprime index k.

Original entry on oeis.org

14, 15, 55, 121, 122, 123, 214, 215, 265, 287, 407, 481, 482, 535, 667, 813, 851, 901, 951, 1119, 1149, 1174, 1537, 1538, 1639, 1681, 1961, 2059, 2117, 2165, 2209, 2245, 2246, 2386, 2419, 2458, 2501, 2513, 2537, 2603, 2629, 2641, 2642, 2643, 2807, 2845
Offset: 1

Views

Author

Eva-Maria Zschorn (e-m.zschorn(AT)zaschendorf.km3.de), Apr 02 2010

Keywords

Comments

Numbers of the form q * r where q and r are primes, not necessarily distinct.
These numbers are also called semiprimes or 2-almost primes.
For primes with such a property see A033548

Examples

			sp(5) = 14 = 2 * 7 is the 5th semiprime, sum of digits sod(14) = 1+4 = 5, 1st term
sp(6) = 15 = 3 * 5 is the 6th semiprime, sum of digits sod(15) = 1+5 = 6. 2nd term
sp(40) = 121 = 11^2 is the 40th semiprime, sum of digits sod(121) = 1+2+1 = 4, 4th term
Additionally for the prime based (q=r=11) square 121: sod(q) + sod(r) = 2 * sod(11) = 4
The first 110 such semiprimes:
14, 15, 55, 121, 122, 123, 214, 215, 265, 287, 407, 481, 482, 535, 667, 813, 851, 901, 951, 1119,
1149, 1174, 1537, 1538, 1639, 1681, 1961, 2059, 2117, 2165, 2209, 2245, 2246, 2386, 2419,
2458, 2501, 2513, 2537, 2603, 2629, 2641, 2642, 2643, 2807, 2845, 2846, 2858, 2859, 2921,
3158, 3205, 3218, 3427, 3439, 4322, 4333, 4367, 4661, 4713, 4714, 4735, 4811, 5221, 5317,
5318, 5615, 5707, 5753, 6009, 6022, 6023, 6046, 6081, 6082, 6117, 6193, 6283, 6371, 6411,
6423, 6514, 6515, 6527, 6541, 6542, 6593, 6635, 6649, 6683, 6694, 6905, 7251, 7291, 7363,
7387, 8023, 8102, 8153, 8203, 8401, 8402, 8403, 8503, 8531, 9019, 9201, 9223, 9271, 9902
		

Crossrefs

A276255 Sum of first n Honaker primes.

Original entry on oeis.org

131, 394, 851, 1890, 2939, 4030, 5331, 6692, 8125, 9696, 11609, 13542, 15683, 17904, 20177, 22618, 25209, 27872, 30579, 33298, 36027, 38830, 41897, 45034, 48263, 51696, 55255, 58886, 62977, 67130, 71487, 75884, 80587, 85310, 90213, 95222, 100729, 106430, 112141
Offset: 1

Views

Author

K. D. Bajpai, Aug 25 2016

Keywords

Comments

A Honaker prime is a prime number prime(k) such that k and prime(k) have the same sum of digits.

Examples

			The first Honaker prime is 131, so a(1) = 131.
The second Honaker prime is 263, so a(2) = 131 + 263 = 394.
		

Crossrefs

Cf. A033548.

Programs

  • Mathematica
    Accumulate[Select[Prime@Range@3000, Plus @@ IntegerDigits@# == Plus @@ IntegerDigits@PrimePi@# &]] (* Bajpai *)
    DeleteDuplicates[Accumulate[Table[Prime[n] * Boole[Plus@@IntegerDigits[n] == Plus@@IntegerDigits[Prime[n]]], {n, 1000}]]] (* Alonso del Arte, Aug 25 2016 *)
  • PARI
    first(n)=my(v=vector(n),i,k,s); forprime(p=2,, if(sumdigits(k++)==sumdigits(p), v[i++] = s+=p); if(i==n, return(v))) \\ Charles R Greathouse IV, Aug 29 2016
  • Perl
    use ntheory ":all"; my($s,$i)=(0,0); forprimes { say $s+=$ if sumdigits($) == sumdigits(++$i) } 1e7; # Dana Jacobsen, Aug 29 2016
    

A277111 Lesser of twin primes P(k) and P(k+1) such that Sd(P(k)) + Sd(P(k+1)) = Sd(k) + Sd(k+1), where Sd(x) is the sum of digits of x.

Original entry on oeis.org

1619, 2309, 2339, 12239, 28109, 35081, 37307, 37571, 50549, 51059, 51719, 62129, 64919, 65729, 87539, 89519, 91079, 113759, 121439, 121631, 160649, 170351, 174329, 182129, 191249, 205949, 215459, 223679, 231839, 254039, 270269, 285119, 301841, 317489, 319829
Offset: 1

Views

Author

Paolo P. Lava, Sep 30 2016

Keywords

Examples

			P(256) = 1619, P(257) = 1621; Sd(256) + Sd(257) = 13 + 14 = 27 and Sd(1619) + Sd(1621) = 17 + 10 = 27.
		

Crossrefs

Programs

  • Maple
    T:=proc(w) local x, y, z; x:=w; y:=0; for z from 1 to ilog10(x)+1 do y:=y+(x mod 10); x:=trunc(x/10); od; y; end:
    P:= proc(q) local a,b,k,n;
    for n from 1 to q do if ithprime(n+1)-ithprime(n)=2 then if T(ithprime(n))+T(ithprime(n+1))=T(n)+T(n+1) then print(ithprime(n)); fi; fi; od; end: P(10^5);

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

Views

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

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

Views

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@# &]

A169645 Primes p = prime(k) of form 13//r, s//13 or t//13//u and sod(p) = sod(k).

Original entry on oeis.org

131, 1301, 1361, 1913, 3137, 7013, 7213, 11353, 12613, 13007, 13037, 13127, 13217, 13297, 13327, 13339, 13367, 13417, 13457, 13933, 15913, 18013, 22613, 29131, 31391, 41131, 41333, 51131, 54013, 57139, 57713, 63313, 64513, 65713, 68813, 70139, 71353, 74713
Offset: 1

Views

Author

Eva-Maria Zschorn (e-m.zschorn(AT)zaschendorf.km3.de), Apr 05 2010

Keywords

Comments

Sum of digits of p = prime(k), p containing the string "13", equals sum of digits of the prime index k
A subsequence of A033548
Still no (published) proof if sequence is infinite

Examples

			13//1 = 131 = prime(32), r = 1, sod(k) = 5
19//13 = 1913 = prime(293), s = 19, sod(k) = 14
3//13//7 = 3137 = prime(446), t = 3, u = 7, sod(k) = 14
		

Crossrefs

Programs

  • Mathematica
    sodQ[{a_,b_}]:=SequenceCount[IntegerDigits[b],{1,3}]>0&&Total[ IntegerDigits[ a]] ==Total[IntegerDigits[b]]; Select[Table[ {n, Prime[n]},{n,7000}],sodQ][[All,2]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, May 10 2018 *)

Extensions

Corrected and extended by Harvey P. Dale, May 10 2018

A178613 The smaller member prime(i) of an emirp pair (prime(i),prime(j)), such that the digit sum of i equals the digit sum of j.

Original entry on oeis.org

37, 359, 769, 1409, 7687, 10711, 10853, 11243, 11593, 13441, 13751, 14423, 14551, 14879, 15307, 15661, 16879, 17959, 30853, 31193, 33863, 34589, 37307, 37489, 38449, 73369, 74959, 75239, 78259, 78839, 79669, 90089, 92779, 100267, 101531
Offset: 1

Views

Author

Ulrich Krug (leuchtfeuer37(AT)gmx.de), May 30 2010

Keywords

Comments

We consider base-10 emirp pairs (13,31) = (prime(6),prime(11)), (17,71) = (prime(7),prime(20)), (37,73) = (prime(12),prime(21)), ... (see A006567) and the digit sums of their prime indices (6,2=1+1), (7,2=2+0), (3=1+2,3=2=1),.. (see A156793).
If the digits sums of the two indices are the same, the smaller representative of the emirp pair is entered into the sequence.

Examples

			37 = prime(12) and 73 = prime(21) are an emirp pair with equal digit sums of the indices 1+2 = 3 = 2+1, which puts 37 into the sequence.
359 = prime(72) and 953 = prime(162) are an emirp pair with digit sums 7+2 = 9 = 1+6+2, which puts 359 into the sequence.
The 6th term is from the pair (10711 = prime(1306), 11701 = prime(1405)), see A033548
16th term: (17959 = prime(2059), 95971 = prime(9250)).
21st term: (34589 = prime(3694), 98543 = prime(9463)).
		

References

  • W. W. R. Ball, H. S. M. Coxeter: Mathematical Recreations and Essays, 13th edition, Dover Publications, 2010
  • C. Mauduit, J. Rivat: Sur un problème de Gelfond: la somme des chiffres des nombres premiers, Annals of Mathematics, Vol. 171, No. 3, 1591-1646, 2010
  • H Schubart: Einfuehrung in die klassische und moderne Zahlentheorie Vieweg, Braunschweig, 1974

Crossrefs

Programs

  • Mathematica
    f[n_] := Plus @@ IntegerDigits@ PrimePi@n; fQ[n_] := Block[{id = IntegerDigits@n}, rid = Reverse@ id; q = FromDigits@ rid; rid != id && PrimeQ@ FromDigits@ rid && n < q && f@n == f@q]; lst = {}; p = 13; While[p < 102148, If[ fQ@p, AppendTo[lst, p]]; p = NextPrime@p]; lst (* Robert G. Wilson v, Jul 31 2010 *)

Extensions

More terms from Robert G. Wilson v, Jul 31 2010

A261142 Numbers n such that n, p=prime(n) and q=prime(p) have the same sum of digits.

Original entry on oeis.org

88, 248, 826, 1417, 1571, 1595, 3682, 3928, 4448, 5089, 5137, 6479, 7754, 8038, 8384, 8461, 9257, 9640, 10393, 10825, 10922, 11878, 13294, 14290, 14767, 14941, 15977, 16786, 17684, 17777, 17935, 18437, 18677, 19495, 20497, 20555, 21649, 22487, 23239, 23396
Offset: 1

Views

Author

Zak Seidov, Oct 22 2015

Keywords

Comments

Hence both p and q are Honaker primes (A033548) and both n and p are terms in A033549.

Examples

			n=88, p=prime(n)=457 and q=prime(p)=3229 have the same sum of digits=16;
n=248, p=prime(n)=1571 and q=prime(p)=13217 have the same sum of digits=14;
n=660349, p=178115131 and q=178115131 have the same sum of digits=28.
		

Crossrefs

A281299 Primes p whose binary representation p_2 is the decimal representation of a prime q; and also the sum of the decimal digits of p equals the sum of the digits of p_2.

Original entry on oeis.org

5011, 7001, 11251, 22501, 32303, 32411, 90031, 101107, 104123, 108011, 111323, 121343, 122131, 124001, 125101, 141023, 224011, 233021, 235003, 241141, 321203, 324011, 421303, 432031, 442201, 510331, 511213, 520411, 801011, 1000183, 1000541, 1001191, 1005223, 1006231
Offset: 1

Views

Author

K. D. Bajpai, Jan 19 2017

Keywords

Comments

Intersection of A037308 and A065720.

Examples

			a(1) = 5011 is a prime;
5011_2 = 1001110010011_10 is a prime;
5 + 0 + 1 + 1 = 7;
1 + 0 + 0 + 1 + 1 + 1 + 0 + 0 + 1 + 0 + 0 + 1 + 1 = 7; both the digit sums are equal.
		

Crossrefs

Programs

  • Mathematica
    Select[Prime[Range[1000000]], PrimeQ[FromDigits[IntegerDigits[#, 2]]] && Plus @@ IntegerDigits[#] == Plus @@ IntegerDigits[FromDigits[IntegerDigits[#, 2]]] &]
  • PARI
    eva(n) = subst(Pol(n), x, 10)
    is(n) = ispseudoprime(n) && ispseudoprime(eva(binary(n))) && sumdigits(n)==sumdigits(eva(binary(n))) \\ Felix Fröhlich, Jan 19 2017

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

Views

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
Previous Showing 21-30 of 30 results.