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-2 of 2 results.

A257521 Odd Brazilian numbers.

Original entry on oeis.org

7, 13, 15, 21, 27, 31, 33, 35, 39, 43, 45, 51, 55, 57, 63, 65, 69, 73, 75, 77, 81, 85, 87, 91, 93, 95, 99, 105, 111, 115, 117, 119, 121, 123, 125, 127, 129, 133, 135, 141, 143, 145, 147, 153, 155, 157, 159, 161, 165, 171, 175, 177, 183, 185, 187, 189, 195
Offset: 1

Views

Author

Daniel Lignon, Apr 27 2015

Keywords

Comments

All even integers 2p >=8 are Brazilian numbers (A125134), because 2p=2(p-1)+2 is written 22 in base p-1 if p-1>2, that is true if p >=4. But, among Brazilian numbers, there are also odd ones...
The only square of a prime is 121. - Robert G. Wilson v, May 21 2015

Crossrefs

Cf. A125134 (Brazilian numbers), A253261 (odd Brazilian squares).
Cf. A085104 (prime Brazilian numbers).

Programs

  • Maple
    N:= 1000: # to get all terms <= N
    for b from 2 to floor(N/2-1) do
       dk:= 1 + (b mod 2);
       for j from 1 to b-1 by 2 do
         for k from dk by dk do
           if j=1 and k=1 then next fi;
           x:= j*(b^(k+1)-1)/(b-1);
           if x > N then break fi;
           B[x]:= 1;
         od
       od
    od:
    sort(map(op,[indices(B)])); # Robert Israel, May 27 2015
  • Mathematica
    fQ[n_] := Block[{b = 2}, While[b < n - 1 && Length[ Union[ IntegerDigits[n, b]]] > 1, b++]; b < n - 1]; Select[1 + 2 Range@100, fQ] (* Robert G. Wilson v, May 21 2015 *)
  • PARI
    forstep(n=5, 300, 2, for(b=2, n-2, d=digits(n, b); if(vecmin(d)==vecmax(d), print1(n, ", "); break))) \\ Derek Orr, Apr 30 2015

A258165 Odd non-Brazilian numbers > 1.

Original entry on oeis.org

3, 5, 9, 11, 17, 19, 23, 25, 29, 37, 41, 47, 49, 53, 59, 61, 67, 71, 79, 83, 89, 97, 101, 103, 107, 109, 113, 131, 137, 139, 149, 151, 163, 167, 169, 173, 179, 181, 191, 193, 197, 199, 223, 227, 229, 233, 239, 251, 257, 263, 269, 271, 277, 281, 283, 289, 293, 311, 313, 317, 331, 337
Offset: 1

Views

Author

Keywords

Comments

Complement of A257521 in A144396 (odd numbers > 1).
The terms are only odd primes or squares of odd primes.
Most odd primes are present except those in A085104.
All terms which are not primes are squares of odd primes except 121 = 11^2.

Examples

			11 is present because there is no base b < 11 - 1 = 10 such that the representation of 11 in base b is a repdigit (all digits are equal). In fact, we have: 11 = 1011_2 = 102_3 = 23_4 = 21_5 = 15_6 = 14_7 = 13_8 = 12_9, and none of these representations are repdigits. - _Bernard Schott_, Jun 21 2017
		

Crossrefs

Programs

  • Mathematica
    fQ[n_] := Block[{b = 2}, While[b < n - 1 && Length@ Union@ IntegerDigits[n, b] > 1, b++]; b+1 == n]; Select[1 + 2 Range@ 170, fQ]
  • PARI
    forstep(n=3, 300, 2, c=1; for(b=2, n-2, d=digits(n, b); if(vecmin(d)==vecmax(d), c=0;  break));if(c,print1(n,", "))) \\ Derek Orr, May 27 2015
    
  • Python
    from sympy.ntheory.factor_ import digits
    l=[]
    for n in range(3, 301, 2):
        c=1
        for b in range(2, n - 1):
            d=digits(n, b)[1:]
            if max(d)==min(d):
                c=0
                break
        if c: l.append(n)
    print(l) # Indranil Ghosh, Jun 22 2017, after PARI program
Showing 1-2 of 2 results.