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 11-20 of 40 results. Next

A175944 1 appears once, n-th prime p appears p times.

Original entry on oeis.org

1, 2, 2, 3, 3, 3, 5, 5, 5, 5, 5, 7, 7, 7, 7, 7, 7, 7, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Oct 27 2010

Keywords

Comments

a(A014284(n)) = a(A175965(n)) = A018252(n). [Reinhard Zumkeller, Mar 18 2011]
This is how A063905 would have been reckoned at the beginning of the 20th century, taking the primes as given in A008578 instead of the way they are given in A000040. [Alonso del Arte, Sep 09 2011]

Crossrefs

Cf. A063905.
Cf. A005145.

Programs

  • Haskell
    a175944 n = a175944_list !! (n-1)
    a175944_list =
       concat $ zipWith ($) (map replicate a018252_list) a018252_list
    -- Reinhard Zumkeller, Mar 18 2011
  • Mathematica
    Join[{1}, Flatten[Table[Prime[n], {n, 8}, {Prime[n]}]]] (* Alonso del Arte, Sep 08 2011 based on Robert G. Wilson v's program for A002024 *)
    Join[{1},Flatten[Table[PadRight[{},n,n],{n,Prime[Range[10]]}]]] (* Harvey P. Dale, May 16 2019 *)

Formula

a(1)=1, a(n)=A063905(n-1) for n>1.

A089228 Numbers m such that 1 + Sum_{k=1..m} prime(k) is prime.

Original entry on oeis.org

1, 3, 5, 7, 9, 13, 19, 25, 29, 31, 49, 51, 57, 97, 99, 103, 109, 119, 123, 127, 163, 169, 179, 185, 195, 207, 209, 211, 213, 217, 221, 223, 233, 235, 239, 251, 261, 269, 273, 289, 295, 297, 303, 325, 329, 333, 347, 369, 371, 375, 409, 439, 449, 453, 455, 467
Offset: 1

Views

Author

Yalcin Aktar, Dec 10 2003

Keywords

Comments

Also numbers n such that the sum of the first n "primes", as defined in A008578, is prime. Analogous to A013916. - Robert G. Wilson v, May 19 2015
Integers k such that A007504(k) + 1 is prime. - Michel Marcus, Aug 10 2023

Examples

			25 is a term: 1 + Sum_{k=1..25} prime(k) = 1061 is prime.
		

Crossrefs

Programs

  • Maple
    a:=proc(n) if isprime(1+add(ithprime(k),k=1..n))=true then n else fi end: seq(a(n),n=1..600); # Emeric Deutsch, Jul 02 2005
    # alternative
    Primes:= select(isprime,[2,seq(2*i+1,i=1..10^5)]):
    PS:= ListTools:-PartialSums(Primes):
    select(t -> isprime(PS[t]+1), [$1..nops(PS)]); # Robert Israel, May 19 2015
  • Mathematica
    Position[1 + Accumulate@ Prime@ Range@ 600, A013916%20*)%20(*%20_Robert%20G.%20Wilson%20v">?(PrimeQ@# &)] // Flatten (* after Harvey P. Dale from A013916 *) (* _Robert G. Wilson v, May 19 2015 *)
  • PARI
    for(n=1,10^3,if(isprime(1+sum(i=1,n,prime(i))),print1(n,", "))) \\ Derek Orr, May 19 2015

Extensions

Corrected and extended by Emeric Deutsch, Jul 02 2005

A175966 Complement of A175965(n), where A175965(n) = the lexicographically earliest sequence with first differences as increasing sequence of noncomposites A008578.

Original entry on oeis.org

3, 5, 6, 8, 9, 10, 11, 13, 14, 15, 16, 17, 18, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 80
Offset: 1

Views

Author

Jaroslav Krizek, Oct 31 2010

Keywords

Crossrefs

A175970 Complement of A051349(n), where A051349(n) = the lexicographically earliest sequence with first differences as increasing sequence of composites A002808(n).

Original entry on oeis.org

2, 3, 4, 6, 7, 8, 9, 10, 12, 13, 14, 15, 16, 17, 18, 20, 21, 22, 23, 24, 25, 26, 27, 29, 30, 31, 32, 33, 34, 35, 36, 37, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 65, 66, 67, 68, 69, 70
Offset: 1

Views

Author

Jaroslav Krizek, Oct 31 2010

Keywords

Crossrefs

A175968 Complement of A175967(n), where A175967(n) = the lexicographically earliest sequence with first differences as increasing sequence of nonprimes A018252(n).

Original entry on oeis.org

3, 4, 5, 7, 8, 9, 10, 11, 13, 14, 15, 16, 17, 18, 19, 21, 22, 23, 24, 25, 26, 27, 28, 30, 31, 32, 33, 34, 35, 36, 37, 38, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79
Offset: 1

Views

Author

Jaroslav Krizek, Oct 31 2010

Keywords

Crossrefs

A036439 a(n) = a(n-1) + prime(n-1), with a(1)=2.

Original entry on oeis.org

2, 4, 7, 12, 19, 30, 43, 60, 79, 102, 131, 162, 199, 240, 283, 330, 383, 442, 503, 570, 641, 714, 793, 876, 965, 1062, 1163, 1266, 1373, 1482, 1595, 1722, 1853, 1990, 2129, 2278, 2429, 2586, 2749, 2916, 3089, 3268, 3449, 3640, 3833, 4030, 4229, 4440, 4663
Offset: 1

Views

Author

Pavel Bubak (pbub6070(AT)beta.ms.mff.cuni.cz)

Keywords

Comments

Old name was "a(n) = 2 + the sum of the first n-1 prime numbers".

Crossrefs

A014284(n) + 1.

Programs

  • Mathematica
    nxt[{n_,a_}]:={n+1,a+Prime[n]}; NestList[nxt,{1,2},50][[All,2]] (* Harvey P. Dale, Sep 21 2016 *)
  • PARI
    a(n) = 2 + sum(i=1, n-1, prime(i)); \\ Michel Marcus, Aug 12 2013

Extensions

More terms from James Sellers, Feb 06 2000
Offset changed and definition improved from Bruno Berselli, Jul 30 2013

A280055 Nachos sequence based on 1 plus primes (A008578).

Original entry on oeis.org

1, 2, 1, 2, 3, 1, 2, 3, 2, 3, 1, 2, 3, 2, 3, 4, 2, 1, 2, 3, 2, 3, 4, 2, 3, 4, 3, 4, 1, 2, 3, 2, 3, 4, 2, 3, 4, 3, 4, 2, 3, 1, 2, 3, 2, 3, 4, 2, 3, 4, 3, 4, 2, 3, 4, 3, 4, 5, 1, 2, 3, 2, 3, 4, 2, 3, 4, 3, 4, 2, 3, 4, 3, 4, 5, 3, 2, 1, 2, 3, 2, 3, 4, 2, 3, 4, 3, 4, 2, 3, 4, 3, 4, 5, 3, 2, 3, 4, 3
Offset: 1

Views

Author

N. J. A. Sloane, Jan 08 2017

Keywords

Comments

Like A280053 but based on 1,2,3,5,7,11,... rather than squares. See that entry for further information.
Equivalently, greedily subtract terms of A014284 from n until reaching 0; a(n) = number of steps required.

Examples

			26 takes 4 phases to read 0:
subtract leaves
1   25
2   23
3   20
5   15
7   8
------
1   7
2   5
3   2
------
1   1
------
1   0
so a(26) = 4
		

Crossrefs

For records see A280760.

Programs

  • Maple
    A280055 := proc(n)
        local a,nres,i ;
        a := 0 ;
        nres := n;
        while nres > 0 do
            for i from 1 do
                if A014284(i) > nres then
                    break;
                end if;
            end do:
            nres := nres-A014284(i-1) ;
            a := a+1 ;
        end do:
        a ;
    end proc:
    seq(A280055(n),n=1..80) ; # R. J. Mathar, Mar 05 2017

A345297 a(n) is the least k >= 0 such that A331835(k) = n.

Original entry on oeis.org

0, 1, 2, 3, 5, 6, 7, 10, 11, 13, 14, 15, 22, 23, 26, 27, 29, 30, 31, 43, 45, 46, 47, 54, 55, 58, 59, 61, 62, 63, 94, 95, 107, 109, 110, 111, 118, 119, 122, 123, 125, 126, 127, 187, 189, 190, 191, 222, 223, 235, 237, 238, 239, 246, 247, 250, 251, 253, 254, 255
Offset: 0

Views

Author

Rémy Sigrist, Jun 13 2021

Keywords

Comments

Sequence A200947 gives the position of the last occurrence of a number in A331835.

Examples

			We have:
           n|  0  1  2  3  4  5  6  7  8  9  10  11  12  13  14  15  16  17  18
  ----------+------------------------------------------------------------------
  A331835(n)|  0  1  2  3  3  4  5  6  5  6   7   8   8   9  10  11   7   8   9
So a(0) = 0,
   a(1) = 1,
   a(2) = 2,
   a(3) = 3,
   a(4) = 5,
   a(5) = 6,
   a(6) = 7,
   a(7) = 10,
   a(8) = 11,
   a(9) = 13,
   a(10) = 14,
   a(11) = 15.
		

Crossrefs

Programs

  • C
    See Links section.
    
  • Python
    from sympy import prime
    def p(n): return prime(n) if n >= 1 else 1
    def A331835(n): return sum(p(i)*int(b) for i, b in enumerate(bin(n)[:1:-1]))
    def adict(klimit):
        adict = dict()
        for k in range(klimit+1):
            fk = A331835(k)
            if fk not in adict: adict[fk] = k
        n, alst = 0, []
        while n in adict: alst.append(adict[n]); n += 1
        return alst
    print(adict(255)) # Michael S. Branicky, Jun 13 2021

Formula

a(A014284(n)) = 2^n - 1.
a(n) <= A200947(n).

A110996 Powers equal to (sum of first k primes) plus 1, for some k >= 0.

Original entry on oeis.org

1, 441, 970225, 1464100, 194379364, 1303400915339554201
Offset: 1

Views

Author

Walter Kehowski, Sep 30 2005

Keywords

Comments

I have checked for powers out to the 250000th prime and the last element found is at the 6420th prime, 64067. It is interesting to note that the only powers so far are squares. Finding a higher power would be interesting.

Examples

			1 is a term (corresponding to k=0), since it is the empty sum plus 1. - _N. J. A. Sloane_, Dec 02 2015
441 is a term since sum(primes<=59) = 440 and 441 = 21^2.
		

Crossrefs

Intersection of A001597 and A014284.

Programs

  • Maple
    with(numtheory); egcd := proc(n) local L; L:=map(proc(z) z[2] end, ifactors(n)[2]); igcd(op(L)) end: s := proc(n) option remember; local p; if n=1 then [1,2] else [n,s(n-1)[2]+ithprime(n)] fi end; t := proc(n) option remember; [n,s(n)[2]+1] fi end; PW:=[]; for z to 1 do for j from 1 to 250000 do if egcd(t(j)[2])>1 then PW:=[op(PW),t(j)] fi od od; PW;
  • PARI
    lista(nn) = { print1(1, ", "); s = 1; for(k=1, nn, s += prime(k); if(ispower(s) || s==1, print1(s, ", ")););} \\ Altug Alkan, Nov 29 2015

Extensions

New term 1 prepended by Altug Alkan, Nov 29 2015
a(6) from Jinyuan Wang, Aug 09 2023

A227547 a(n) = a(n-1) + prime(n-1), with a(1)=3.

Original entry on oeis.org

3, 5, 8, 13, 20, 31, 44, 61, 80, 103, 132, 163, 200, 241, 284, 331, 384, 443, 504, 571, 642, 715, 794, 877, 966, 1063, 1164, 1267, 1374, 1483, 1596, 1723, 1854, 1991, 2130, 2279, 2430, 2587, 2750, 2917, 3090, 3269, 3450, 3641, 3834, 4031, 4230, 4441, 4664
Offset: 1

Views

Author

Vincenzo Librandi, Jul 27 2013

Keywords

Crossrefs

Programs

  • Magma
    [IsOne(n) select 3 else Self(n-1)+NthPrime(n-1): n in [1..50]]; // Bruno Berselli, Jul 30 2013
  • Mathematica
    Accumulate[Join[{3}, Prime[Range[60]]]]

Formula

a(n) = A036439(n) + 1 = A014284(n) + 2 = A007504(n-1) + 3 (in this case, n>1).
Previous Showing 11-20 of 40 results. Next