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-10 of 11 results. Next

A079651 Primes having only {1, 4, 7} as digits.

Original entry on oeis.org

7, 11, 17, 41, 47, 71, 1117, 1171, 1447, 1471, 1741, 1747, 1777, 4111, 4177, 4441, 4447, 7177, 7411, 7417, 7477, 7717, 7741, 11117, 11171, 11177, 11411, 11447, 11471, 11717, 11777, 14177, 14411, 14447, 14717, 14741, 14747, 14771, 17117, 17417
Offset: 1

Views

Author

Shyam Sunder Gupta, Jan 23 2003

Keywords

Comments

The number of decimal digits of a(n) is never divisible by 3. - Robert Israel, May 22 2014
The smallest prime using only all three straight digits is a(9) = 1447 (see Prime Curios! link). - Bernard Schott, Sep 08 2023

Examples

			17 is a term because it is a prime and consists of straight digits 1 and 7 only.
		

Crossrefs

Cf. A028373.

Programs

  • Maple
    f:= proc(x) local n,d,t,i,a;
    n:= floor(log[3]((2*x+3)));
    if n mod 3 = 0 then return 0 fi;
    d:=x - (3^n - 3)/2;
    t:= 0;
    for i from 0 to n-1 do
       a:= d mod 3;
       t:= t + (3*a+1)*10^i;
       d:= (d-a)/3;
    od:
    t
    end proc:
    select(isprime, map(f, [$1..1000])); # Robert Israel, May 22 2014
  • Mathematica
    Select[Prime[Range[2000]], Union[ Join[ IntegerDigits[ # ], {1, 4, 7}]] == {1, 4, 7} &]
  • PARI
    straight(n)=my(t);while(n,t=n%10;if(t!=1&&t!=4&&t!=7,return(0));n\=10);!!t
    select(straight, primes(1000)) \\ Charles R Greathouse IV, Sep 25 2012

Extensions

Corrected and extended by Robert G. Wilson v, Jan 24 2003

A028374 Numbers that have only curved digits {0, 3, 6, 8, 9} or digits that are both curved and linear {2, 5}.

Original entry on oeis.org

0, 2, 3, 5, 6, 8, 9, 20, 22, 23, 25, 26, 28, 29, 30, 32, 33, 35, 36, 38, 39, 50, 52, 53, 55, 56, 58, 59, 60, 62, 63, 65, 66, 68, 69, 80, 82, 83, 85, 86, 88, 89, 90, 92, 93, 95, 96, 98, 99, 200, 202, 203, 205, 206, 208, 209, 220, 222, 223, 225, 226, 228, 229, 230, 232, 233
Offset: 1

Views

Author

Greg Heil (gheil(AT)scn.org), Dec 11 1999

Keywords

Comments

From Bernard Schott, Mar 26 2023: (Start)
Previous name was: "Curved numbers: numbers that have only curved digits (0, 2, 3, 5, 6, 8, 9)"; but in fact, the curved numbers form the sequence A072960.
This sequence allows all digits except for 1, 4 and 7. (End)

Examples

			From _K. D. Bajpai_, Sep 07 2014: (Start)
206 is in the sequence because it has only curved digits 2, 0 and 6.
208 is in the sequence because it has only curved digits 2, 0 and 8.
2035689 is the smallest number having all the curved digits.
(End)
		

Crossrefs

Cf. A028373 (straight digits: 1, 4, 7), A072960 (curved digits: 0, 3, 6, 8, 9), A072961 (both straight and curved digits: 2, 5).
Combinations: A082741 (digits: 1, 2, 4, 5, 7), A361780 (digits: 0, 1, 3, 4, 6, 7, 8, 9).
Cf. A034470 (subsequence of primes).

Programs

  • Magma
    [n: n in [0..300] | Set(Intseq(n)) subset [0,2,3,5, 6,8,9] ]; // Vincenzo Librandi, Sep 19 2014
  • Maple
    N:= 3: S:= {0, 2, 3, 5, 6, 8, 9}: K:= S:
    for j from 2 to N do
         K:= map(t -> seq(10*t+s, s=S), K);
             od:
    print( K);  # K. D. Bajpai, Sep 07 2014
  • Mathematica
    f[n_] := Block[{id = IntegerDigits[n], curve = {0, 2, 3, 5, 6, 8, 9}}, If[ Union[ Join[id, curve]] == curve, True, False]]; Select[ Range[0, 240], f[ # ] & ]
    Select[Range[0, 249], Union[DigitCount[#] * {1, 0, 0, 1, 0, 0, 1, 0, 0, 0}] == {0} &] (* Alonso del Arte, May 23 2014 *)
    Select[Range[0,500],Intersection[IntegerDigits[#],{1,4,7}]=={}&] (* K. D. Bajpai, Sep 07 2014 *)
  • Python
    for n in range(10**3):
      s = str(n)
      if not (s.count('1') + s.count('4') + s.count('7')):
        print(n,end=', ') # Derek Orr, Sep 19 2014
    

Extensions

Corrected and extended by Rick L. Shepherd, May 21 2003
Offset corrected by Arkadiusz Wesolowski, Aug 15 2011
Definition clarified by Bernard Schott, Mar 25 2023

A082741 Numbers that have digits consisting only of line segments or both line segments and curves (base 10 digits are 1, 2, 4, 5, 7).

Original entry on oeis.org

1, 2, 4, 5, 7, 11, 12, 14, 15, 17, 21, 22, 24, 25, 27, 41, 42, 44, 45, 47, 51, 52, 54, 55, 57, 71, 72, 74, 75, 77, 111, 112, 114, 115, 117, 121, 122, 124, 125, 127, 141, 142, 144, 145, 147, 151, 152, 154, 155, 157, 171, 172, 174, 175, 177, 211, 212, 214, 215, 217, 221
Offset: 1

Views

Author

Rick L. Shepherd, May 21 2003

Keywords

Comments

This sequence allows the digits 2 and 5, formed from combinations of line segments and curves; the subsequence A028373 does not.

Crossrefs

Cf. A028373 (line-segment digits 1, 4, 7 only), A028374 (digits with curves or both curves and line segments), A072960 (curved digits 0, 3, 6, 8, 9 only).

Programs

  • Maple
    a:= proc(n) local d, i, m, r; m:=n; r:=0;
          for i from 0 while m>0 do
            d:= irem(m, 5, 'm');
            if d=0 then d:=5; m:=m-1 fi;
            r:= r+10^i*[1, 2, 4, 5, 7][d]
          od: r
        end:
    seq(a(n), n=1..100);  # Alois P. Heinz, May 25 2014
  • Mathematica
    Table[FromDigits/@Tuples[{1,2,4,5,7},n],{n,3}]//Flatten (* Harvey P. Dale, Apr 17 2022 *)

A078309 Numbers that are congruent to {1, 4, 7} mod 10.

Original entry on oeis.org

1, 4, 7, 11, 14, 17, 21, 24, 27, 31, 34, 37, 41, 44, 47, 51, 54, 57, 61, 64, 67, 71, 74, 77, 81, 84, 87, 91, 94, 97, 101, 104, 107, 111, 114, 117, 121, 124, 127, 131, 134, 137, 141, 144, 147, 151, 154, 157, 161, 164, 167, 171, 174, 177, 181, 184, 187, 191, 194, 197
Offset: 1

Views

Author

Jochen Ziegenbalg, Dec 23 2002

Keywords

Comments

The formula 1 + 3*mod(n-1, 3) + floor(2/7 + (n-1)/n) * 10^floor((n-1)/3) produces a sequence with the same first 6 terms.
Numbers with last digit 1, 4, or 7. - Wesley Ivan Hurt, Jun 14 2016

Crossrefs

The sequence begins with the same first 6 terms as the 'Straight' sequence (A028373).

Programs

  • Magma
    [3*n + Floor((n-1)/3) - 2: n in [1..60]]; // Vincenzo Librandi, Apr 23 2014
  • Maple
    A078309:=n->(30*n-24-3*cos(2*n*Pi/3)+sqrt(3)*sin(2*n*Pi/3))/9: seq(A078309(n), n=1..100); # Wesley Ivan Hurt, Jun 14 2016
  • Mathematica
    Table[1 + 3*Mod[n - 1, 3] + 10*Floor[(n - 1)/3], {n, 55}]
    Select[Range[200], MemberQ[{1,4,7}, Mod[#,10]]&] (* or *) LinearRecurrence[ {1,0,1,-1}, {1,4,7,11}, 60] (* Harvey P. Dale, Apr 21 2014 *)
    CoefficientList[Series[(-1 - 3 x (1 + x + x^2))/(-1 + x + x^3 - x^4), {x, 0, 100}], x] (* Vincenzo Librandi, Apr 23 2014 *)
  • PARI
    a(n)=1+n--%3*3+n\3*10 \\ Charles R Greathouse IV, Sep 25 2012
    

Formula

a(n) = 1 + 3*mod(n-1, 3) + 10*floor((n-1)/3).
From Arkadiusz Wesolowski, Sep 21 2012: (Start)
a(n) = a(n-3) + 10 for n>4.
a(n) = a(n-1) + a(n-3) - a(n-4) for n>4.
a(n) = 3*n + floor((n-1)/3) - 2.
G.f.: (-x - 3*(x^2 + x^3 + x^4))/(-1 + x + x^3 - x^4). (End)
From Wesley Ivan Hurt, Jun 14 2016: (Start)
a(n) = (30*n-24-3*cos(2*n*Pi/3)+sqrt(3)*sin(2*n*Pi/3))/9.
a(3k) = 10k-3, a(3k-1) = 10k-6, a(3k-2) = 10k-9. (End)

Extensions

Edited by Robert G. Wilson v, Dec 24 2002

A079064 a(n) is the next available entirely straight or curved number, depending on whether n contains a straight digit or not.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 14, 17, 41, 44, 47, 71, 74, 77, 111, 200, 411, 500, 502, 711, 800, 802, 1111, 2000, 2002, 2003, 4111, 5000, 5002, 7111, 8000, 8002, 11111, 20000, 20002, 41111, 41114, 41117, 41141, 41144, 41147, 41171, 41174, 41177, 41411, 50000
Offset: 0

Views

Author

Jon Perry, Feb 02 2003

Keywords

Examples

			a(10) must be the first entirely straight number greater than 9, as 1 is straight, therefore a(10)=11.
a(20) must be the first entirely curved number greater than 111, therefore a(20)=200.
		

Crossrefs

Cf. A028373 (straight numbers), A028374 (curved numbers), A079170.

Extensions

Edited by Charles R Greathouse IV, Aug 02 2010
a(35) and beyond from David Consiglio, Jr., Oct 31 2023

A079170 a(n) is the next available entirely straight or curved number, depending on whether n contains a curved digit or not.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 20, 41, 50, 52, 71, 80, 82, 111, 200, 202, 203, 205, 206, 208, 209, 220, 222, 223, 225, 226, 228, 229, 230, 232, 233, 235, 236, 238, 239, 250, 252, 411, 500, 502, 711, 800, 802, 1111, 2000, 2002, 2003, 2005, 2006, 2008, 2009, 2020
Offset: 0

Views

Author

Jon Perry, Feb 03 2003

Keywords

Examples

			a(10) must be the first entirely curved number greater than 9, as 0 is curved, therefore a(10)=20.
a(17) must be the first entirely straight number greater than 82, therefore a(20)=111.
		

Crossrefs

Cf. A028373 (straight numbers), A028374 (curved numbers), A079064.

Extensions

a(33) and beyond from David Consiglio, Jr., Oct 31 2023

A079654 Triangular numbers using only the straight digits 1, 4 and 7.

Original entry on oeis.org

1, 171, 741, 1711, 117144471, 417417171, 7417744447141, 177141144447177414711441, 1417711714147441711474771771, 144114474147744777714441111111771711, 111411774474177744717747747477177774111
Offset: 1

Views

Author

Shyam Sunder Gupta, Jan 23 2003

Keywords

Comments

Probably finite.
a(12) > 10^40 if it exists. - Tyler Busby, Mar 22 2023

Crossrefs

Cf. A000217, A028373, A053899, A119127. See A119033 for a table of cross-references.

Programs

  • Mathematica
    Do[ If[ Union[ Join[ IntegerDigits[n(n + 1)/2], {1, 4, 7}]] == {1, 4, 7}, Print[n(n + 1)/2]], {n, 0, 3*10^7}]

Formula

a(n) = A000217(A119127(n)). - Tyler Busby, Mar 31 2023

Extensions

Edited and extended by Robert G. Wilson v, Jan 24 2003
More terms from Giovanni Resta, May 10 2006
a(10)-a(11) from Tyler Busby, Mar 22 2023

A361780 Numbers that have digits consisting only of line segments {1, 4, 7} or curved digits {0, 3, 6, 8, 9}.

Original entry on oeis.org

0, 1, 3, 4, 6, 7, 8, 9, 10, 11, 13, 14, 16, 17, 18, 19, 30, 31, 33, 34, 36, 37, 38, 39, 40, 41, 43, 44, 46, 47, 48, 49, 60, 61, 63, 64, 66, 67, 68, 69, 70, 71, 73, 74, 76, 77, 78, 79, 80, 81, 83, 84, 86, 87, 88, 89, 90, 91, 93, 94, 96, 97, 98, 99, 100, 101, 103, 104, 106, 107, 108, 109, 110
Offset: 1

Views

Author

Bernard Schott, Mar 23 2023

Keywords

Comments

This sequence allows all digits except for 2 and 5.

Crossrefs

Cf. A028373 (line-segment digits: {1, 4, 7}), A072960 (curved digits: {0, 3, 6, 8, 9}), A072961 (both line segments and curves digits: {2, 5}).
Cf. A082741 (digits: {1, 2, 4, 5, 7}), A028374 (digits: {0, 2, 3, 5, 6, 8, 9}), this sequence (digits {0, 1, 3, 4, 6, 7, 8, 9}).

Programs

  • Mathematica
    Select[Range[0, 110], AllTrue[IntegerDigits[#], ! MemberQ[{2, 5}, #1] &] &] (* Amiram Eldar, Mar 24 2023 *)

A242739 Semiprimes having only straight digits.

Original entry on oeis.org

4, 14, 74, 77, 111, 141, 177, 411, 417, 447, 471, 717, 771, 1111, 1114, 1141, 1147, 1174, 1177, 1411, 1417, 1441, 1477, 1711, 1714, 1717, 1774, 4117, 4141, 4171, 4174, 4411, 4414, 4417, 4471, 4474, 4711, 4714, 4717, 4741, 4747, 4771, 4777, 7111, 7114, 7117, 7141
Offset: 1

Views

Author

K. D. Bajpai, May 21 2014

Keywords

Comments

A straight digit semiprime has only the straight digits, i.e., 1, 4 or 7.
Intersection of A001358 and A028373. - Michel Marcus, May 25 2014

Examples

			471 = 3 * 157 is semiprime and has only straight digits 4, 7 and 1. Hence it is in the sequence.
1147 =  31 * 37 is semiprime and has only straight digits 1, 1, 4 and 7. Hence it is in the sequence.
		

Crossrefs

Programs

  • Mathematica
    A242739 = {}; Do[a = PrimeOmega[n]; If [a == 2 && Intersection[IntegerDigits[n], {0, 2, 3, 5, 6, 8, 9}] == {}, AppendTo[A242739, n]], {n, 8000}]; A242739
    Table[Select[FromDigits/@Tuples[{1,4,7},n],PrimeOmega[#]==2&],{n,4}]//Flatten (* Harvey P. Dale, Sep 23 2022 *)

A247021 Triangular numbers composed of only digits with line segments or both line segments and curves {1, 2, 4, 5, 7}.

Original entry on oeis.org

1, 15, 21, 45, 55, 171, 741, 1225, 1275, 1711, 2145, 2211, 2415, 2775, 5151, 11175, 15225, 21115, 22155, 25425, 44551, 45451, 72771, 77421, 112575, 121771, 124251, 125751, 151525, 211575, 221445, 222111, 224115, 227475, 254541, 255255, 417241, 451725, 551775, 577275
Offset: 1

Views

Author

K. D. Bajpai, Sep 09 2014

Keywords

Comments

Intersection of A000217 and A082741.
Every term is congruent to 1 mod 10 or 5 mod 10. - Derek Orr, Sep 19 2014

Examples

			1275 is a term because 1275 = 50 * (50 + 1) / 2, is a triangular number composed of digits 1, 2, 7 and 5.
2145 is a term because 2145 = 65 * (65 + 1) / 2, is a triangular number composed of digits 1, 2, 4 and 5.
a(38) = 451725 is the first occurrence of triangular number using each digit 1, 2, 4, 5 or 7 at least once.
		

Crossrefs

Programs

  • Mathematica
    A247021 = {}; Do[t = n*(n + 1)/2; If[Intersection[IntegerDigits[t], {0, 3, 6, 8, 9}] == {}, AppendTo[A247021, t]], {n, 1000}]; A247021
    Select[Accumulate[Range[1500]],SubsetQ[{1,2,4,5,7}, IntegerDigits[#]]&] (* Harvey P. Dale, May 20 2025 *)
  • Python
    for n in range(10**3):
      s = str(int(n*(n+1)/2))
      if not (s.count('0') + s.count('3') + s.count('6') + s.count('8') + s.count('9')):
        print(int(s), end=', ') # Derek Orr, Sep 19 2014
Showing 1-10 of 11 results. Next