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: Frederick John Bernet III

Frederick John Bernet III's wiki page.

Frederick John Bernet III has authored 2 sequences.

A327277 Irregular triangle read by rows in which row n lists the first prime(n) primes.

Original entry on oeis.org

2, 3, 2, 3, 5, 2, 3, 5, 7, 11, 2, 3, 5, 7, 11, 13, 17, 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67
Offset: 1

Author

Keywords

Examples

			Table begins:
  2, 3;
  2, 3, 5;
  2, 3, 5, 7, 11;
  2, 3, 5, 7, 11, 13, 17;
  2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31;
  2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41;
  ...
		

Crossrefs

Right border gives A006450.
A138117 is essentially the same triangle.

Programs

  • Mathematica
    m = 8; p = Array[Prime, Prime[m]]; Join @@ (p[[1 ;; p[[#]]]] & /@ Range[m]) (* Amiram Eldar, Sep 24 2019 *)
    Table[Take[Prime[Range[Prime[n]]],n],{n,Prime[Range[10]]}]//Flatten (* Harvey P. Dale, Oct 30 2021 *)

A325483 Numbers whose sum of their decimal digits is less than or equal to the sum of the digits of their binary representation.

Original entry on oeis.org

0, 1, 10, 11, 20, 21, 30, 31, 100, 101, 102, 103, 110, 111, 120, 121, 122, 123, 200, 201, 202, 203, 210, 211, 220, 221, 222, 223, 230, 231, 300, 301, 302, 303, 310, 311, 410, 411, 500, 501, 502, 503, 510, 511, 1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007
Offset: 1

Author

Keywords

Crossrefs

Supersequence of A037308 and A108580.

Programs

  • Maple
    q:= n-> (f-> is(f(n, 10)<=f(n, 2)))((x, b)
              -> add(i, i=convert(x, base, b))):
    select(q, [$0..1500])[];  # Alois P. Heinz, Sep 06 2019
  • Mathematica
    Select[Range[0,1007], Total[IntegerDigits[#]]<=Total[IntegerDigits[#,2]]&] (* Metin Sariyar, Sep 14 2019 *)
  • PARI
    isok(n) = sumdigits(n, 10) <= sumdigits(n, 2); \\ Michel Marcus, Sep 07 2019
  • Python
    x=0
    #Adjust the inequality below to generate more numbers of the sequence
    while(x<100):
        x = x+1
        Number = int(bin(x)[2:])
        Bin_Sum = 0
        while(Number > 0):
            Reminder = Number % 10
            Bin_Sum = Bin_Sum + Reminder
            Number = Number //10
        Number = x
        Sum = 0
        while(Number > 0):
            Reminder = Number % 10
            Sum = Sum + Reminder
            Number = Number //10
        if (Sum <= Bin_Sum):
            print(x)
    
  • Python
    def ok(n): return sum(map(int, str(n))) <= bin(n).count('1')
    print(list(filter(ok, range(1008)))) # Michael S. Branicky, Oct 11 2021
    

Formula

{ A037308 } union { A108580 }.