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.

Showing 1-3 of 3 results.

A062343 Primes whose sum of digits is 8.

Original entry on oeis.org

17, 53, 71, 107, 233, 251, 431, 503, 521, 701, 1061, 1151, 1223, 1511, 1601, 2141, 2213, 2411, 3023, 3041, 3203, 3221, 4013, 4211, 5003, 5021, 6011, 6101, 7001, 10007, 10061, 10133, 10151, 10223, 10313, 10331, 10601, 11213, 11321, 11411
Offset: 1

Views

Author

Amarnath Murthy, Jun 21 2001

Keywords

Examples

			1151 belongs to the sequence since it is a prime with sum of digits = 8.
		

Crossrefs

Cf. A000040 (primes), A007953 (sum of digits), A052222 (digit sum = 8).
Cf. A062339 (same for digit sum s = 4), A062341 (s = 5), A062337 (s = 7), A107579 (s = 10), and others listed in A244918 (s = 68).
Subsequence of A062342 (primes with digit sum divisible by 8).

Programs

  • Magma
    [p: p in PrimesUpTo(20000) | &+Intseq(p) eq 8]; // Vincenzo Librandi, Jul 08 2014
    
  • Maple
    A062343 := proc(n)
        option remember ;
        local p ;
        if n = 1 then
            17;
        else
            p := nextprime(procname(n-1)) ;
            while true do
                if digsum(p) = 8 then # digsum in oeis.org/transforms.txt
                    return p;
                else
                    p := nextprime(p) ;
                end if;
            end do:
        end if;
    end proc:
    seq(A062343(n),n=1..80) ; # R. J. Mathar, May 22 2025
  • Mathematica
    Select[Prime[Range[500000]], Total[IntegerDigits[#]]==8 &] (* Vincenzo Librandi, Jul 08 2014 *)
  • PARI
    select( {is_A062343(p, s=8)=sumdigits(p)==s&&isprime(p)}, primes([1, 12345])) \\ 2nd optional parameter for similar sequences with other digit sums. M. F. Hasler, Mar 09 2022
    
  • PARI
    {A062343_upto_length(L, s=8, a=List(), u=[10^(L-k)|k<-[1..L]])=forvec(d=[[1, L]|i<-[1..s]], isprime(p=vecsum(vecextract(u, d))) && listput(a, p), 1); Vecrev(a)} \\ M. F. Hasler, Mar 09 2022

Formula

Intersection of A000040 (primes) and A052222 (digit sum 8). - M. F. Hasler, Mar 09 2022

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), Jul 06 2001

A106757 Primes with digit sum = 16.

Original entry on oeis.org

79, 97, 277, 349, 367, 439, 457, 547, 619, 673, 691, 709, 727, 853, 907, 1069, 1087, 1249, 1429, 1447, 1483, 1609, 1627, 1663, 1753, 1861, 1933, 1951, 2239, 2293, 2347, 2383, 2437, 2473, 2617, 2671, 2707, 2833, 2851, 3049, 3067, 3229, 3319, 3373, 3391
Offset: 1

Views

Author

Zak Seidov, May 16 2005

Keywords

Crossrefs

Cf. A000040 (primes), A007953 (sum of digits), A235227 (digit sum = 16).
Cf. A062339 (same for digit sum s = 4), A106756 (s = 14), A106758 (s = 17), and others listed in A244918 (s = 68).
Subsequence of A062342 (primes whose sum of digits is a multiple of 8) and of A107288 (primes with sum of digits a square).

Programs

  • Magma
    [p: p in PrimesUpTo(4000) | &+Intseq(p) eq 16]; // Vincenzo Librandi, Jul 08 2014
    
  • Mathematica
    Reap[Do[If[16==Apply[Plus,IntegerDigits[p=Prime[n]]],Sow[p]],{n,1000}]][[2,1]] (* Zak Seidov, Oct 30 2009 *)
    Select[Prime[Range[500]],Total[IntegerDigits[#]]==16&] (* Harvey P. Dale, Nov 14 2011 *)
  • PARI
    select( {is_A106757(n)= sumdigits(n)==16 && isprime(n)}, primes([1, 3333])) \\ M. F. Hasler, Mar 09 2022

Formula

Intersection of A000040 (primes) and A235227 (digit sum = 16); also equals { p in A000040 | A007953(p) = 16 }. - M. F. Hasler, Mar 09 2022

Extensions

More terms from Zak Seidov, Oct 30 2009

A273188 Numbers whose digit sum is divisible by 8.

Original entry on oeis.org

0, 8, 17, 26, 35, 44, 53, 62, 71, 79, 80, 88, 97, 107, 116, 125, 134, 143, 152, 161, 169, 170, 178, 187, 196, 206, 215, 224, 233, 242, 251, 259, 260, 268, 277, 286, 295, 305, 314, 323, 332, 341, 349, 350, 358, 367, 376, 385, 394, 404, 413, 422, 431, 439, 440, 448, 457, 466
Offset: 1

Views

Author

Elana Lessing, May 17 2016

Keywords

Comments

Is a(n) ~ 8n? - David A. Corneth, May 19 2016

Crossrefs

Cf. A062342 (subsequence of primes), A227793 (equivalent for 5).

Programs

  • Mathematica
    Select[Range@ 600, Mod[Total@ IntegerDigits@ #, 8] == 0 &] (* Michael De Vlieger, May 19 2016 *)
  • PARI
    isok(n) = sumdigits(n) % 8 == 0; \\ Michel Marcus, May 18 2016
Showing 1-3 of 3 results.