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.

A053696 Numbers that can be represented as a string of three or more 1's in a base >= 2.

Original entry on oeis.org

7, 13, 15, 21, 31, 40, 43, 57, 63, 73, 85, 91, 111, 121, 127, 133, 156, 157, 183, 211, 241, 255, 259, 273, 307, 341, 343, 364, 381, 400, 421, 463, 507, 511, 553, 585, 601, 651, 703, 757, 781, 813, 820, 871, 931, 993, 1023, 1057, 1093, 1111, 1123, 1191
Offset: 1

Views

Author

Henry Bottomley, Mar 23 2000

Keywords

Comments

Numbers of the form (b^n-1)/(b-1) for n > 2 and b > 1. - T. D. Noe, Jun 07 2006
Numbers m that are nontrivial repunits for any base b >= 2. For k = 2 (I use k for the exponent since n is used as the index in a(n)) we get (b^k-1)/(b-1) = (b^2-1)/(b-1) = b+1, so every integer m >= 3 is a 2-digit repunit in base b = m-1. And for n = 1 (the 1-digit degenerate repunit) we get (b-1)/(b-1) = 1 for any base b >= 2. If we considered all k >= 1 we would get the sequence of all positive integers except 2 since it is the smallest uniform base used in positional representation (2 might be seen as the "repunit" in a nonpositional base representation such as the Roman numerals where 2 is expressed as II). - Daniel Forgues, Mar 01 2009
These repunits numbers belong to Brazilian numbers (A125134) (see Links: "Les nombres brésiliens" - section IV, p. 32). - Bernard Schott, Dec 18 2012
The Brazilian primes (A085104) belong to this sequence. - Bernard Schott, Dec 18 2012

Examples

			a(5) = 31 because 31 can be written as 111 base 5 (or indeed 11111 base 2).
		

Crossrefs

Cf. A090503 (a subsequence), A119598 (numbers that are repunits in four or more bases), A125134, A085104.
Cf. A108348.

Programs

  • Haskell
    a053696 n = a053696_list !! (n-1)
    a053696_list = filter ((> 1) . a088323) [2..]
    -- Reinhard Zumkeller, Jan 22 2014, Nov 26 2013
  • Maple
    N:= 10^4: # to get all terms <= N
    V:= Vector(N):
    for b from 2 while (b^3-1)/(b-1) <= N do
      inds:= [seq((b^k-1)/(b-1), k=3..ilog[b](N*(b-1)+1))];
      V[inds]:= 1;
    od:
    select(t -> V[t] = 1, [$1..N]); # Robert Israel, Dec 10 2015
  • Mathematica
    fQ[n_] := Block[{d = Rest@ Divisors[n - 1]}, Length@ d > 2 && Length@ Select[ IntegerDigits[n, d], Union@# == {1} &] > 1]; Select[ Range@ 1200, fQ]
    lim=1000; Union[Reap[Do[n=3; While[a=(b^n-1)/(b-1); a<=lim, Sow[a]; n++], {b, 2, Floor[Sqrt[lim]]}]][[2, 1]]]
    Take[Union[Flatten[With[{l=Table[PadLeft[{},n,1],{n,3,100}]}, Table[ FromDigits[#,n]&/@l,{n,2,100}]]]],80] (* Harvey P. Dale, Oct 06 2011 *)
  • PARI
    list(lim)=my(v=List(),e,t);for(b=2,sqrt(lim),e=3;while((t=(b^e-1)/(b-1))<=lim,listput(v,t);e++));vecsort(Vec(v),,8) \\ Charles R Greathouse IV, Oct 06 2011
    
  • PARI
    list(lim)=my(v=List(),e,t);for(b=2,lim^(1/3),e=4;while((t=(b^e-1)/(b-1))<=lim,listput(v,t);e++));vecsort(concat(Vec(v), vector((sqrtint (lim\1*4-3)-3)\2,i,i^2+3*i+3)),,8) \\ Charles R Greathouse IV, May 30 2013
    

Formula

a(n) ~ n^2 since as n grows the density of repunits of degree 2 among all the repunits tends to 1. - Daniel Forgues, Dec 09 2008
A088323(a(n)) > 1. - Reinhard Zumkeller, Jan 22 2014

A108348 Numbers of the form p^k + p^(k-1) + ... + p + 1 (where p is a prime and k>=0) in ascending order.

Original entry on oeis.org

1, 3, 4, 6, 7, 8, 12, 13, 14, 15, 18, 20, 24, 30, 31, 32, 38, 40, 42, 44, 48, 54, 57, 60, 62, 63, 68, 72, 74, 80, 84, 90, 98, 102, 104, 108, 110, 114, 121, 127, 128, 132, 133, 138, 140, 150, 152, 156, 158, 164, 168, 174, 180, 182, 183, 192, 194, 198, 200
Offset: 1

Views

Author

Franz Vrabec, Jul 01 2005

Keywords

Comments

A proper subset of A002191 (e.g., 28 is in A002191, but not in this sequence). a(15)=31 admits two representations: 31=2^4+2^3+2^2+2+1=5^2+5+1. Are there other numbers with two or more representation?
I have checked all the sums of primes up to prime number 56873 to a sum total >= 10^100 and have not come across another number that has multiple representations. - Patrick Schutte (patrick(AT)onyxsa.co.za), Mar 28 2007
Goormaghtigh conjecture implies that 31 is the only term with 2 representations; see the Wikipedia link below. - Jianing Song, Nov 22 2022

Examples

			a(2)=3=2+1 since a(1)=1 and 2 is not expressible in the required form.
		

Crossrefs

Programs

  • GAP
    SumNum := function ( FNum) local a,ap,b,bp,at,bt; a := 2; repeat at := 1; ap := 1; repeat at := at + a^ap; b := 2; repeat bt := 1; bp := 1; repeat bt := bt + b^bp; if at = bt and bp > 1 and a <> b then Print("a ",a," ap ",ap," at ", at," "); Print("b ",b," bp ",bp," bt ", bt," "); Print("---------------- "); fi; bp := bp + 1; until bt > at; b := NextPrime(b); until b >=a; ap := ap + 1; until at > 10^100; a := NextPrime(a); until a >FNum; end; # Patrick Schutte (patrick(AT)onyxsa.co.za), Mar 28 2007
    
  • Haskell
    a108348 n = a108348_list !! (n-1)
    a108348_list = 1 : f [2..] where
       f (x:xs) = g a000040_list where
         g (p:ps) = h 0 $ map ((`div` (p - 1)) . subtract 1) $
                              iterate (* p) (p ^ 2) where
           h i (pp:pps) | pp > x    = if i == 0 then f xs else g ps
                        | pp < x    = h 1 pps
                        | otherwise = x : f xs
    -- Reinhard Zumkeller, Nov 26 2013
  • PARI
    A108348(n)={ local(m=1, a=[m]); while( #aA108348(1000) \\ M. F. Hasler
    

A258777 Number of points of projective spaces on finite fields.

Original entry on oeis.org

1, 3, 4, 5, 6, 7, 8, 9, 10, 12, 13, 14, 15, 17, 18, 20, 21, 24, 26, 28, 30, 31, 32, 33, 38, 40, 42, 44, 48, 50, 54, 57, 60, 62, 63, 65, 68, 72, 73, 74, 80, 82, 84, 85, 90, 91, 98, 102, 104, 108, 110, 114, 121, 122, 126, 127, 128, 129, 132, 133, 138, 140, 150, 152, 156, 158, 164, 168, 170, 174, 180, 182, 183, 192, 194, 198, 200
Offset: 1

Views

Author

Matthieu Pluntz, Jun 09 2015

Keywords

Comments

List of integers of form (p^(k*n) - 1)/(p^k - 1) = sigma_k(p^(n-1)) = sum of d^k over all divisors d of p^(n-1), for some prime p and some positive integers k and n. The cardinality of the field is p^k and the dimension of the space is n-1.
In other words, numbers that are a repunit in at least one base that is a prime power (A246655). - Peter Munn, Oct 21 2020

Examples

			7 = (2^(1*3) - 1)/(2^1 - 1) so 7 is in the sequence. 10 = (3^(2*2) - 1)/(3^2 - 1) so 10 is in the sequence.
		

Crossrefs

Union of 1, A090503 and (A246655 + 1).
Subsequence of A211347.

Programs

  • Mathematica
    max = 200; Join[{1}, Select[{#, DivisorSigma[Range[Max[1, Log[#, max] // Floor]], #]}& /@ Range[2, max], PrimePowerQ[#[[1]]]&][[All, 2]] // Flatten // Union] // Select[#, # <= max&]& (* Jean-François Alcover, Jun 24 2015 after Giovanni Resta *)
  • PARI
    list(lim)=my(v=List([1]),t); lim\=1; if(lim<2,lim=2); for(k=1,logint(lim - 1, 2), for(n=2,logint(lim*(2^k - 1) + 1, 2)\k, forprime(p=2,, t=(p^(k*n) - 1)/(p^k - 1); if(t>lim,break); listput(v,t)))); Set(v) \\ Charles R Greathouse IV, Jun 24 2015
Showing 1-3 of 3 results.