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

A125134 "Brazilian" numbers ("les nombres brésiliens" in French): numbers n such that there is a natural number b with 1 < b < n-1 such that the representation of n in base b has all equal digits.

Original entry on oeis.org

7, 8, 10, 12, 13, 14, 15, 16, 18, 20, 21, 22, 24, 26, 27, 28, 30, 31, 32, 33, 34, 35, 36, 38, 39, 40, 42, 43, 44, 45, 46, 48, 50, 51, 52, 54, 55, 56, 57, 58, 60, 62, 63, 64, 65, 66, 68, 69, 70, 72, 73, 74, 75, 76, 77, 78, 80, 81, 82, 84, 85, 86, 87, 88, 90
Offset: 1

Views

Author

Bernard Schott, Jan 21 2007

Keywords

Comments

The condition b < n-1 is important because every number n has representation 11 in base n-1. - Daniel Lignon, May 22 2015
Every even number >= 8 is Brazilian. Odd Brazilian numbers are in A257521. - Daniel Lignon, May 22 2015
Looking at A190300, it seems that asymptotically 100% of composite numbers are Brazilian, while looking at A085104, it seems that asymptotically 0% of prime numbers are Brazilian. The asymptotic density of Brazilian numbers would thus be 100%. - Daniel Forgues, Oct 07 2016

Examples

			15 is a member since it is 33 in base 4.
		

References

  • Pierre Bornsztein, "Hypermath", Vuibert, Exercise a35, p. 7.

Crossrefs

Cf. A190300 and A257521 (odd Brazilian numbers).
Cf. A085104 (prime Brazilian numbers).

Programs

  • Maple
    isA125134 := proc(n) local k: for k from 2 to n-2 do if(nops(convert(convert(n,base,k),set))=1)then return true: fi: od: return false: end: A125134 := proc(n) option remember: local k: if(n=1)then return 7: fi: for k from procname(n-1)+1 do if(isA125134(k))then return k: fi: od: end: seq(A125134(n),n=1..65); # Nathaniel Johnston, May 24 2011
  • Mathematica
    fQ[n_] := Module[{b = 2, found = False}, While[b < n - 1 && Length[Union[IntegerDigits[n, b]]] > 1, b++]; b < n - 1]; Select[Range[4, 90], fQ] (* T. D. Noe, May 07 2013 *)
  • PARI
    for(n=4,100,for(b=2,n-2,d=digits(n,b);if(vecmin(d)==vecmax(d),print1(n,", ");break))) \\ Derek Orr, Apr 30 2015
    
  • PARI
    is(n)=my(m); if(!isprime(n), return(if(issquare(n,&m), m>3 && (!isprime(m) || m==11), n>6))); for(b=2,n-2, m=digits(n,b); for(i=2,#m, if(m[i]!=m[i-1], next(2))); return(1)); 0 \\ Charles R Greathouse IV, Aug 09 2017

Formula

a(n) ~ n. - Charles R Greathouse IV, Aug 09 2017

Extensions

More terms from Nathaniel Johnston, May 24 2011

A220570 Numbers that are not Brazilian numbers.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 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
Offset: 1

Views

Author

Bernard Schott, Dec 16 2012

Keywords

Comments

From Bernard Schott, Apr 23 2019: (Start)
The terms of this sequence are:
- integer 1
- oblong semiprime 6,
- primes that are not Brazilian, they are in A220627, and,
- squares of all the primes, except 121 = (11111)_3.
So there is an infinity of integers that are not Brazilian numbers. (End)
This sequence has density 0 as A125134(n) ~ n where A125134 is the complement of this sequence. - David A. Corneth, Jan 22 2021

Examples

			25 is a member because it's not possible to write 25=(mm...mm)_b where b is a natural number with 1 < b < 24 and 1 <= m < b.
		

References

  • Pierre Bornsztein, "Hypermath", Vuibert, Exercise a35, page 7.

Crossrefs

Cf. A125134 (Brazilian numbers), A190300 (composite numbers not Brazilian), A258165 (odd numbers not Brazilian), A220627 (prime numbers not Brazilian).

Programs

  • PARI
    for(n=1,300,c=0;for(b=2,n-2,d=digits(n,b);if(vecmin(d)==vecmax(d),c=n;break);c++);if(c==max(n-3,0),print1(n,", "))) \\ Derek Orr, Apr 30 2015

A220571 Composite numbers that are Brazilian.

Original entry on oeis.org

8, 10, 12, 14, 15, 16, 18, 20, 21, 22, 24, 26, 27, 28, 30, 32, 33, 34, 35, 36, 38, 39, 40, 42, 44, 45, 46, 48, 50, 51, 52, 54, 55, 56, 57, 58, 60, 62, 63, 64, 65, 66, 68, 69, 70, 72, 74, 75, 76, 77, 78, 80, 81, 82, 84, 85, 86, 87, 88, 90, 91, 92, 93, 94, 95, 96, 98, 99, 100
Offset: 1

Views

Author

Bernard Schott, Dec 16 2012

Keywords

Comments

There are just two differences of members with A080257:
1) the term 6 is missing here because 6 is not a Brazilian number.
2) the new term 121 is present although 121 has only 3 divisors, because 121 = 11^2 = 11111_3 is a composite number which is Brazilian. 121 is the lone square of a prime which is Brazilian: Theorem 5, page 37 of Quadrature article in links.
There is an infinity of Brazilian composite numbers (Theorem 1, page 32 of Quadrature article in links: every even number >= 8 is a Brazilian number).

Crossrefs

Programs

  • Mathematica
    Select[Range[4, 10^2], And[CompositeQ@ #, Module[{b = 2, n = #}, While[And[b < n - 1, Length@ Union@ IntegerDigits[n, b] > 1], b++]; b < n - 1]] &] (* Michael De Vlieger, Jul 30 2017, after T. D. Noe at A125134 *)

A340796 a(n) is the smallest number with exactly n divisors that are Brazilian.

Original entry on oeis.org

1, 7, 14, 24, 40, 48, 60, 84, 140, 144, 120, 168, 252, 700, 240, 336, 560, 360, 420, 672, 1120, 2304, 960, 720, 1008, 1080, 840, 2184, 1800, 1260, 2016, 5376, 8960, 2160, 1680, 2880, 4032, 3600, 7056, 19600, 3960, 2520, 3360, 6480, 9072, 9900, 6300, 11520, 16128
Offset: 0

Views

Author

Bernard Schott, Jan 21 2021

Keywords

Comments

Primes can be partitioned into Brazilian primes and non-Brazilian primes. If two distinct primes each larger than 11 are in the same category then the larger one has a multiplicity that is smaller than or equal to that of the smaller prime. - David A. Corneth, Jan 24 2021

Examples

			Of the eight divisors of 24, three are Brazilian numbers: 8, 12 and 24, and there is no smaller number with three Brazilian divisors, hence a(3) = 24.
		

Crossrefs

Similar with: A087997 (palindromes), A333456 (Niven), A335038 (Zuckerman).

Programs

  • Mathematica
    brazQ[n_] := Module[{b = 2, found = False}, While[b < n - 1 && Length[Union[IntegerDigits[n, b]]] > 1, b++]; b < n - 1]; d[n_] := DivisorSum[n, 1 &, brazQ[#] &]; m = 30; s = Table[0, {m}]; c = 0; n = 1; While[c < m, i = d[n]; If[i < m && s[[i + 1]] == 0, c++; s[[i + 1]] = n]; n++]; s (* Amiram Eldar, Jan 21 2021 *)
  • PARI
    isokb(n) = for(b=2, n-2, d=digits(n, b); if(vecmin(d)==vecmax(d), return(1))); \\ A125134
    isok(k, n) = sumdiv(k, d, isokb(d)) == n;
    a(n) = my(k=1); while (!isok(k, n), k++); k; \\ Michel Marcus, Jan 23 2021

Extensions

More terms from Amiram Eldar, Jan 21 2021

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

A326708 Non-Brazilian squares of primes.

Original entry on oeis.org

4, 9, 25, 49, 169, 289, 361, 529, 841, 961, 1369, 1681, 1849, 2209, 2809, 3481, 3721, 4489, 5041, 5329, 6241, 6889, 7921, 9409, 10201, 10609, 11449, 11881, 12769, 16129, 17161, 18769, 19321, 22201, 22801, 24649, 26569, 27889, 29929, 32041, 32761
Offset: 1

Views

Author

Bernard Schott, Aug 26 2019

Keywords

Comments

This sequence is a subsequence of A326707.
For these terms, we have the relations beta'(p^2) = beta"(p^2) = beta(p^2) = (tau(p^2) - 3)/2 = 0.
This sequence = A001248 \ {121} because 121 is the only known square of a prime that is Brazilian (Wikipédia link); 121 is a solution y^q of the Nagell-Ljunggren equation y^q = (b^m-1)/(b-1) with y = 11, q =2, b = 3, m = 5 (see A208242), hence 121 = 11^2 = (3^5 -1)/2 = 11111_3.
The corresponding square roots are: 2, 3, 5, 7, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, ...

Examples

			49 = 7^2 is not Brazilian, so beta(49) = 0 with tau(49) = 3.
		

Crossrefs

Cf. A190300.
Subsequence of A000290 and of A220570 and of A190300.
Intersection of A001248 and A326707.

Programs

  • Mathematica
    brazBases[n_] := Select[Range[2, n - 2], Length[Union[IntegerDigits[n, #]]] == 1 &]; Select[Range[2, 1000], PrimeQ[#^(1/2)]&& brazBases[#] == {} &] (* Metin Sariyar, Sep 05 2019 *)

A364421 For n >= 3, r >= 0, y an integer, a(n) is the number of integral solutions to the elliptic equation y^2 = n^3 + n^2 + 2*r*n + r^2.

Original entry on oeis.org

2, 2, 2, 3, 2, 4, 3, 4, 2, 8, 2, 4, 8, 5, 2, 7, 2, 9, 8, 4, 2, 15, 3, 4, 5, 10, 2, 15, 2, 7, 8, 4, 8, 17, 2, 4, 8, 15, 2, 15, 2, 10, 14, 4, 2, 22, 3, 7, 8, 9, 2, 10, 8, 15, 8, 4, 2, 38, 2, 4, 14, 8, 8, 15, 2, 9, 7, 16, 2, 27, 2, 4, 13, 9, 8, 15, 2, 22, 6, 4, 2, 39, 8, 4, 7, 16, 2, 27, 8, 10
Offset: 3

Views

Author

Ctibor O. Zizka, Sep 01 2023

Keywords

Comments

The equation y^2 = n^3 + A*n^2 + B*n + C, where A = 1, B = 2*r, C = r^2 is a minimal model of an elliptic curve with integral coefficients, for details see the Links section.
For a prime number p >= 5, the equation y^2 = p^3 + (p + r)^2 has 2 solutions, r_1 = p*(p - 3)/2 and r_2 = (p + 1)*(p^2 - p - 1)/2.
Factoring the equation y^2 = n^3 + n^2 + 2*r*n + r^2 yields (y+n+r)*(y-n-r) = n^3, which implies y+n+r = d and y-n-r = n^3/d for some divisor d of n^3. Thus a(n) is the number of divisors d of n^3 such that (d-n^3/d)/2 - n is a nonnegative integer. This resolves some of Thomas Scheuerle's conjectures. - Robin Visser, Sep 30 2023

Examples

			n = 6: y^2 = 6^3 + (6 + r)^2 is valid for r = 9, 19, 47, thus a(6) = 3. The 3 solutions [y, n, n+r] are [21, 6, 15], [29, 6, 25], [55, 6, 53].
		

Crossrefs

Programs

  • PARI
    a(n) = length(select((x) -> x[1] >= 0 && x[2] >= n, thue(thueinit(x^2-1,1),n^3),1)) \\ Thomas Scheuerle, Sep 03 2023
    
  • Sage
    def a(n):
        num_sols = 0
        for d in Integer(n^3).divisors():
            if ((d-n^3/d)%2 == 0) and ((d-n^3/d)/2 >= n): num_sols += 1
        return num_sols  # Robin Visser, Sep 30 2023

Formula

a(p) = 2 for p prime >= 5, see Comments.
From Thomas Scheuerle, Sep 04 2023: (Start)
Conjecture: a(A190300(n)) = 3.
Conjecture: a(A196226(n)) = 4.
Conjecture: a(p^3) = 5 if p is an odd prime.
Conjecture: a(2*p^2) = 7 if p is an odd prime. But there exist other cases too, for example a(3*23) = 7.
Conjecture: a(prime(n)^prime(n)) = A245685(n - 1) - 1. (End)

Extensions

a(61)-a(92) from Thomas Scheuerle, Sep 01 2023

A307507 Brazilian semiprimes.

Original entry on oeis.org

10, 14, 15, 21, 22, 26, 33, 34, 35, 38, 39, 46, 51, 55, 57, 58, 62, 65, 69, 74, 77, 82, 85, 86, 87, 91, 93, 94, 95, 106, 111, 115, 118, 119, 121, 122, 123, 129, 133, 134, 141, 142, 143, 145, 146, 155, 158, 159, 161, 166, 177, 178, 183, 185, 187, 194, 201, 202, 203, 205, 206, 209, 213, 214, 215, 217, 218
Offset: 1

Views

Author

Bernard Schott, Apr 11 2019

Keywords

Comments

Comparison with A001358 (semiprimes): in this sequence, there are no squared primes apart from 121 = (11111)_3, and also 6 is missing from here since it is not Brazilian.
Different from the squarefree semiprimes of A006881: this sequence = {A006881 \ 6} Union {121}.

Examples

			a(20) = 74 = 2 * 37 = (22)_36 is semiprime and Brazilian.
25 = 5 * 5 is semiprime and no Brazilian, and 45 = (55)_8 = (33)_14 = 3^2 * 5 is Brazilian but no semiprime.
		

Crossrefs

Intersection of A001358 and A125134.
Showing 1-8 of 8 results.