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.

A141031 Nonprimes in the triangle A141020.

Original entry on oeis.org

1, 4, 8, 16, 32, 33, 63, 124, 136, 244, 276, 480, 560, 561, 944, 1135, 1140, 1856, 2298, 2316, 3649, 4705, 7174, 9398, 9558, 9559, 14104, 18984, 19415, 27728, 38320, 39432, 39457, 54512, 77298, 80075, 80163, 107168, 155823, 162583, 162863, 162864, 210687, 313927, 330878, 414200, 632080, 669872, 814296, 1271960, 1600864
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jul 12 2008

Keywords

Comments

From Petros Hadjicostas, Jun 22 2019: (Start)
This is a dynamically defined sequence. Since the nonprimes from each row are mixed with the nonprimes of previous rows and then sorted, the value of a(n) may change each time we add a new row.
For a modification of R. J. Mathar's program below so that nonprimes are sorted only within each row (so as to get a uniquely defined sequence) see the documentation of sequences A141064, A141065, A141066, A141067, A141068, and A141069.
(End)

Examples

			Scanning rows of A141020 or A141021 and sorting new nonprimes into the list we get:
  1 yields a(1) = 1.
  1 1 yields no new member.
  1 2 1 yields no new member.
  1 4 2 1 yields a(2) = 4.
  1 8 4 2 1 yields a(3) = 8.
  1 16 8 4 2 1 yields a(4) = 16.
  1 32 16 8 4 2 1 yields a(5) = 32.
  1 63 33 16 8 4 2 1 yields a(6) = 33 and a(7) = 63.
  1 124 67 33 16 8 4 2 1 yields a(8) = 124.
  1 244 136 67 33 16 8 4 2 1 yields a(9) = 136 and a(10) = 244.
  1 480 276 136 67 33 16 8 4 2 1 yields a(11) = 276 and a(12) = 480.
  1 944 560 276 136 67 33 16 8 4 2 1 yields a(13) = 560 and a(14) = 944.
  ...
From _Petros Hadjicostas_, Jun 22 2019: (Start)
In the above example, we only sort the nonprimes up to row 11; we get the same output from _R. J. Mathar_'s program below if we say A141031(11). If, however, we include more rows in the program, the indexing of the nonprimes changes.
For example, the nonprimes in the data above come from the nonprimes of 22 rows. If we include more rows, then the indexing again changes and the value of each a(n) may not stay the same.
(End)
		

Crossrefs

Programs

  • Maple
    A141020 := proc(n,k) option remember ; if k<0 or k>n then 0 ; elif k=0 or k=n then 1 ; elif k=n-1 then 2 ; elif k=n-2 then 4 ; elif k=n-3 then 8 ; elif k=n-4 then 16 ; else procname(n-1,k)+procname(n-2,k)+procname(n-3,k)+procname(n-4,k) +procname(n-5,k)+procname(n-5,k-1) ; fi; end:
    A141031 := proc(nmax) local a,n,k ; a := [] ; for n from 0 to nmax do for k from 0 to n do a141020 := A141020(n,k) ; if not isprime(a141020) and not a141020 in a then a := [op(a),a141020] ; fi; od: od: RETURN(sort(a)) ; end: A141031(30) ; # R. J. Mathar, Sep 19 2008

Extensions

Partially edited by N. J. A. Sloane, Jul 18 2008
Simplified definition, corrected values by R. J. Mathar, Sep 19 2008