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.

A138607 List first A008578(1) odd numbers, then first A008578(2) even numbers, then the next A008578(3) odd numbers, then the next A008578(4) even numbers, etc.

Original entry on oeis.org

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

Views

Author

Ctibor O. Zizka, May 14 2008

Keywords

Comments

A permutation of numbers.

Examples

			Let
  S1={1}
  S2={2,4}
  S3={3,5,7}
  S4={6,8,10,12,14}
  S5={9,11,13,15,17,19,21}
  S6={16,18,20,22,24,26,28,30,32,34,36}
  ...
then S1, S2, S3, S4, S5, S6,... gives this sequence.
		

Crossrefs

Formula

If n < 3, a(n) = n. If n-2 = A007504(A083375(n-2)), then a(n) = a(n-1-A000040(A083375(n-2)))+2, otherwise a(n) = a(n-1)+2. - Antti Karttunen, Oct 05 2009.

Extensions

Edited, extended, and offset changed from 0 to 1 by Antti Karttunen, Oct 05 2009

A350174 For k = 0, 1, 2, 3, ... write k prime(k+1) times.

Original entry on oeis.org

0, 0, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9
Offset: 0

Views

Author

Michel Marcus, Dec 18 2021

Keywords

Comments

a(n) = k is the largest k with sum of primes A007504(k) <= n. - Kevin Ryde, Apr 19 2022

References

  • J.-P. Delahaye, Des suites fractales d’entiers, Pour la Science, No. 531 January 2022. Sequence g) p. 82.

Crossrefs

Essentially the same as A083375.

Programs

  • Maple
    a:=[];
    for n from 0 to 10 do a:=[op(a), seq(n,i=1..ithprime(n+1))]; od:
    a; # N. J. A. Sloane, Dec 18 2021
  • Python
    from itertools import count, islice, chain
    from sympy import prime
    def A350174gen(): return chain.from_iterable([k]*prime(k+1) for k in count(0))
    A350174_list = list(islice(A350174gen(),50)) # Chai Wah Wu, Dec 19 2021

Formula

a(n) = A083375(n+1) - 1. - Peter Munn, May 26 2023

A366066 a(n) is the largest positive integer k such that n can be expressed as the sum of k distinct positive integers that are coprime to each other.

Original entry on oeis.org

0, 1, 1, 2, 2, 2, 3, 2, 3, 3, 3, 4, 3, 4, 3, 4, 4, 4, 5, 4, 5, 4, 5, 4, 5, 5, 5, 5, 5, 6, 5, 6, 5, 6, 5, 6, 6, 6, 6, 6, 6, 6, 7, 6, 7, 6, 7, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 7, 8, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 8, 9, 9, 9, 9, 9, 9, 9
Offset: 0

Views

Author

Yifan Xie, Sep 28 2023

Keywords

Comments

The indices at which k first appears, for k >= 0: 1, 3, 6, 11, 18, 29, 42, 59, 78 (A014284). Such n's are expressed as the sum of 1 and the first primes.
Runs with length >= 2 start at numbers k^2 - 1 (k >= 2).
If there are terms between runs of k and k+1, these two numbers occur alternately. Suppose that m is such a term that is b(m) terms after the first occurrence of k+1; if b(m) is odd, there are at least two even numbers in the expression of n as the sum of k+1 integers, which are not coprime to each other, so a(m) = k.

Examples

			For n = 11, 1+2+3+5=11; so a(11) = 4.
For n = 12, 1+4+7=12; so a(12) = 3.
		

Crossrefs

Programs

  • PARI
    lista(nn) = v=[0]; f=[7, 12, 14, 19, 21, 23, 30, 32, 34, 43, 45, 47, 60, 62, 79]; for(n=1, nn, for(i=1, prime(n), v=concat(v, n))); for(n=1, 15, v[f[n]+1]=v[f[n]+1]-1); v;

Formula

a(n) = A083375(n) - 1 if and only if n = 7, 12, 14, 19, 21, 23, 30, 32, 34, 43, 45, 47, 60, 62, 79; otherwise, a(n) = A083375(n).
Showing 1-3 of 3 results.