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: Ali Adams

Ali Adams's wiki page.

Ali Adams has authored 2 sequences.

A329522 Composite numbers whose sum of digits is not composite.

Original entry on oeis.org

10, 12, 14, 16, 20, 21, 25, 30, 32, 34, 38, 49, 50, 52, 56, 58, 65, 70, 74, 76, 85, 92, 94, 98, 100, 102, 104, 106, 110, 111, 115, 119, 120, 122, 124, 128, 133, 140, 142, 146, 148, 155, 160, 164, 166, 175, 182, 184, 188, 200, 201, 203, 205, 209, 210, 212, 214, 218, 221, 230
Offset: 1

Author

Ali Adams, Nov 15 2019

Keywords

Crossrefs

Programs

  • Magma
    [k:k in [2..230]| not IsPrime(k) and (IsPrime(&+Intseq(k)) or &+Intseq(k) eq 1) ]; // Marius A. Burtea, Feb 05 2020
  • Mathematica
    Select[Rest@ Complement[#, Prime@ Range@ PrimePi@ Max@ #] &@ Range@ 230, ! CompositeQ@ Total@ IntegerDigits@ # &] (* Michael De Vlieger, Nov 15 2019 *)
    Select[Range[250],CompositeQ[#]&&!CompositeQ[Total[IntegerDigits[#]]]&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jun 19 2021 *)
  • PARI
    lista(nn) = forcomposite(c=1, nn, my(s=sumdigits(c)); if ((s==1) || isprime(s), print1(c, ", "))); \\ Michel Marcus, Nov 15 2019
    

A260981 Primes p that are equal to the sum of the first k primes where p=prime(prime(k)).

Original entry on oeis.org

5, 17, 41
Offset: 1

Author

Waleed Mohammed, Ali Adams, Aug 06 2015

Keywords

Comments

Terms listed are the only three primes p found to satisfy the condition that p = prime(m) = Sum_{i=1..k} prime(i) where m=prime(k).
From Jon E. Schoenfield, Aug 19 2015: (Start)
Let S(k) be the sum of the first k primes, and let PP(k) = prime(prime(k)); then the terms of the sequence are the values of prime(prime(k)) at those values of k at which S(k) = PP(k). (This occurs at k = 2, 4 and 6.)
Given the behavior of the ratio S(k)/PP(k) over the range of values of k shown in the table below, it seems very unlikely that this ratio will return to 1 for any k beyond the values that have been tested, and thus very likely that a(3) = 41 = PP(6) is the final term in the sequence:
k S(k) PP(k) S(k)/PP(k)
====== =========== ======== ==============
1 2 3 0.666666...
2 5 = 5 1
3 10 11 0.909090...
4 17 = 17 1
5 28 31 0.903225...
6 41 = 41 1
7 58 59 0.983050...
8 77 67 1.149253...
9 100 83 1.204819...
10 129 109 1.183486...
...
100 24133 3911 6.170544...
1000 3682913 80917 45.514700...
10000 496165411 1366661 363.049367...
100000 62260698721 20491057 3038.432752... (End)

Examples

			k=3: prime(3) = 5 = 2+3 = prime(1) + prime(2).
k=7: prime(7) = 17 = 2+3+5+7 = prime(1) + prime(2) + prime(3) + prime(4).
k=13: prime(13) = 41 = 2+3+5+7+11+13 = prime(1) + prime(2) + prime(3) + prime(4) + prime(5) + prime(6).
		

Crossrefs