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

A284971 Numbers with digits 4 and 7 only.

Original entry on oeis.org

4, 7, 44, 47, 74, 77, 444, 447, 474, 477, 744, 747, 774, 777, 4444, 4447, 4474, 4477, 4744, 4747, 4774, 4777, 7444, 7447, 7474, 7477, 7744, 7747, 7774, 7777, 44444, 44447, 44474, 44477, 44744, 44747, 44774, 44777, 47444, 47447, 47474, 47477, 47744, 47747
Offset: 1

Views

Author

Jaroslav Krizek, Apr 07 2017

Keywords

Crossrefs

Prime terms are in A020465.
Numbers with digits 4 and k only for k = 0 - 3 and 5 - 9: A169967 (k = 0), A032822 (k = 1), A284920 (k = 2), A032834 (k = 3), A256290 (k = 5), A284634 (k = 6), this sequence (k = 7), A284972 (k = 8), A284973 (k = 9).

Programs

  • Magma
    [n: n in [1..100000] | Set(IntegerToSequence(n, 10)) subset {4, 7}]
    
  • Mathematica
    Flatten@ Table[FromDigits /@ Tuples[{4, 7}, n], {n, 5}] (* Giovanni Resta, Apr 08 2017 *)
  • PARI
    is(n) = my(x=Set([4, 7]), y=Set([0, 1, 2, 3, 5, 6, 8, 9])); if(#setintersect(Set(digits(n)), x) > 0 && #setintersect(Set(digits(n)), y)==0, return(1)); 0 \\ Felix Fröhlich, Apr 08 2017
    
  • Python
    def a(n):
      b = bin(n+1)[3:]
      return int("".join(b.replace("0", "4").replace("1", "7")))
    print([a(n) for n in range(1, 45)]) # Michael S. Branicky, Apr 07 2021

A316969 Primes p such that p^2 contains all of the square digits {0, 1, 4, 9} only.

Original entry on oeis.org

701, 7001, 10007, 10243, 20347, 70001, 97001, 202757, 306749, 379499, 700001, 997001, 1002247, 1070021, 3317257, 3346507, 9536249, 9970001, 10095247, 20470501, 21095021, 22144979, 94925771, 100000007, 100099501, 104933743, 202520347, 300191597
Offset: 1

Views

Author

K. D. Bajpai, Jul 17 2018

Keywords

Comments

Subset of A285550.

Examples

			701^2 = 491401 that contains all the square digits {0, 1, 4, 9} only. Hence, 701 is a term.
10243^2 = 104919049 that contains all of the square digits {0, 1, 4, 9} only. Hence, 10243 is a term.
997 is not a term because 997^2 = 994009 does not contain the digit '1'.
		

Crossrefs

Programs

  • Mathematica
    Select[Prime[Range[20000000]], Union[IntegerDigits[#^2]] == {0, 1, 4, 9} &]

A284972 Numbers with digits 4 and 8 only.

Original entry on oeis.org

4, 8, 44, 48, 84, 88, 444, 448, 484, 488, 844, 848, 884, 888, 4444, 4448, 4484, 4488, 4844, 4848, 4884, 4888, 8444, 8448, 8484, 8488, 8844, 8848, 8884, 8888, 44444, 44448, 44484, 44488, 44844, 44848, 44884, 44888, 48444, 48448, 48484, 48488, 48844, 48848
Offset: 1

Views

Author

Jaroslav Krizek, Apr 07 2017

Keywords

Comments

All terms are even.

Crossrefs

Numbers with digits 4 and k only for k = 0 - 3 and 5 - 9: A169967 (k = 0), A032822 (k = 1), A284920 (k = 2), A032834 (k = 3), A256290 (k = 5), A284634 (k = 6), A284971 (k = 7), this sequence (k = 8), A284973 (k = 9).

Programs

  • Magma
    [n: n in [1..100000] | Set(IntegerToSequence(n, 10)) subset {4, 8}]
    
  • Mathematica
    Flatten@ Table[FromDigits /@ Tuples[{4, 8}, n], {n, 5}] (* Giovanni Resta, Apr 07 2017 *)
  • PARI
    a(n) = my (b = binary(1+n)); b[1] = 0; return (4*(10^(#b-1)-1)/(10-1) + (8-4)*fromdigits(b)) \\ Rémy Sigrist, Apr 08 2017
    
  • PARI
    a(n)={my(v=binary(n+1));v[1]=0;v+=vector(#v,i,i>1);4*fromdigits(v)} \\ R. J. Cano, Apr 08 2017
    
  • PARI
    a(n,{p=[4,8]})={my(v=binary(n+1));fromdigits(vector(#v-1,i,p[2]*v[i+1]+p[1]*!v[i+1]))} \\ R. J. Cano, Apr 09 2017

Formula

a(n) = 2 * A284920(n) = 4 * A032822(n).

A368337 Semiprimes that contain only digits 4 and 9.

Original entry on oeis.org

4, 9, 49, 94, 949, 4449, 4499, 9449, 44494, 44949, 44999, 49949, 94499, 94994, 99449, 99494, 99949, 444494, 444949, 494449, 494999, 499949, 944494, 944949, 944999, 949999, 994999, 999494, 4444449, 4444499, 4449949, 4449999, 4494449, 4494499, 4494949, 4494999, 4499449, 4499494, 4944449, 4944499
Offset: 1

Views

Author

Zak Seidov and Robert Israel, Dec 21 2023

Keywords

Comments

The only terms that are squares are 4, 9 and 49.
Numbers of n-digit terms for n = 1...20: {2, 2, 1, 3, 13, 11, 31, 39, 78, 159, 383, 541, 1302, 2047, 4268, 6926, 16248, 27172, 57397, 94581}.

Examples

			a(3) = 49 is a term because 49 = 7^2 is a semiprime with digits 4 and 9.
		

Crossrefs

Intersection of A001358 and A284973.
Cf. A020466.

Programs

  • Maple
    R:= 4,9:
    for d from 2 to 6 do
      for x from 0 to 2^d-1 do
        L:= convert(2^d+x,base,2)[1..d];
        y:= add((L[i]*5+4)*10^(i-1),i=1..d);
        if numtheory:-bigomega(y)=2 then R:= R,y; fi
    od od:
    R;
Showing 1-4 of 4 results.