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.

A052406 Numbers without 4 as a digit.

Original entry on oeis.org

0, 1, 2, 3, 5, 6, 7, 8, 9, 10, 11, 12, 13, 15, 16, 17, 18, 19, 20, 21, 22, 23, 25, 26, 27, 28, 29, 30, 31, 32, 33, 35, 36, 37, 38, 39, 50, 51, 52, 53, 55, 56, 57, 58, 59, 60, 61, 62, 63, 65, 66, 67, 68, 69, 70, 71, 72, 73, 75, 76, 77, 78, 79, 80, 81, 82, 83, 85, 86, 87, 88, 89
Offset: 1

Views

Author

Henry Bottomley, Mar 13 2000

Keywords

Comments

This is a frequent sequence on Chinese, Japanese and Korean elevator buttons. - Jean-Sebastien Girard (circeus(AT)hotmail.com), Jul 28 2008
Essentially numbers in base 9 (using digits 0, 1, 2, 3, 5, 6, 7, 8, 9 rather than 0-8). - Charles R Greathouse IV, Oct 13 2013

Crossrefs

Cf. A004179, A004723, A011760, A038612 (subset of primes), A082833 (Kempner series).
Cf. A052382 (without 0), A052383 (without 1), A052404 (without 2), A052405 (without 3), A052413 (without 5), A052414 (without 6), A052419 (without 7), A052421 (without 8), A007095 (without 9).

Programs

  • Haskell
    a052406 = f . subtract 1 where
    f 0 = 0
    f v = 10 * f w + if r > 3 then r + 1 else r where (w, r) = divMod v 9
    -- Reinhard Zumkeller, Oct 07 2014
    
  • Magma
    [ n: n in [0..89] | not 4 in Intseq(n) ]; // Bruno Berselli, May 28 2011
    
  • Maple
    a:= proc(n) local l, m; l, m:= 0, n-1;
          while m>0 do l:= (d->
            `if`(d<4, d, d+1))(irem(m, 9, 'm')), l
          od; parse(cat(l))/10
        end:
    seq(a(n), n=1..100);  # Alois P. Heinz, Aug 01 2016
  • Mathematica
    Select[Range[100], DigitCount[#, 10, 4] == 0 &] (* Alonso del Arte, Oct 13 2013 *)
  • PARI
    g(n)= local(x,v,j,flag); for(x=1,n, v=Vec(Str(x)); flag=1; for(j=1,length(v), if(v[j]=="4",flag=0)); if(flag,print1(x",") ) ) \\ Cino Hilliard, Apr 01 2007
    
  • PARI
    apply( {A052406(n)=fromdigits(apply(d->d+(d>3),digits(n-1,9)))}, [1..99]) \\ a(n)
    select( {is_A052406(n)=!setsearch(Set(digits(n)),4)}, [0..99]) \\ Used in A038612
    next_A052406(n, d=digits(n+=1))={for(i=1, #d, d[i]!=4|| return((1+n\d=10^(#d-i))*d)); n} \\ least a(k) > n. Used for A038612. - M. F. Hasler, Jan 11 2020
    
  • Python
    def A052406(n): n-=1; return sum((d+(d>3))*10**i for d,i in ((n//9**i%9,i) for i in range(math.ceil(math.log(n+1,9))))) # M. F. Hasler, Jan 13 2020
    
  • Python
    from gmpy2 import digits
    def A052406(n): return int(digits(n-1,9).translate(str.maketrans('45678','56789'))) # Chai Wah Wu, Jun 28 2025
  • sh
    seq 0 1000 | grep -v 4; # Joerg Arndt, May 29 2011
    

Formula

a(n) = replace digits d > 3 by d + 1 in base-9 representation of n - 1. - Reinhard Zumkeller, Oct 07 2014
Sum_{k>1} 1/a(k) = A082833 = 21.327465... (Kempner series). - Bernard Schott, Jan 12 2020, edited by M. F. Hasler, Jan 13 2020

Extensions

Offset changed by Reinhard Zumkeller, Oct 07 2014

A085265 Numbers that can be written as sum of a positive squarefree number and a positive square.

Original entry on oeis.org

2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71
Offset: 1

Views

Author

Reinhard Zumkeller, Jun 23 2003

Keywords

Comments

Subsequence of A011760; A085263(a(n)) > 0.
Conjecture: a(n) = n + 2 for n > 11. That is, only 1 and 13 are missing. - Charles R Greathouse IV, Aug 21 2011
Estermann proves that only finitely many positive integers are missing from this sequence. (Probably only 1 and 13.) - Charles R Greathouse IV, Jul 01 2016

Programs

  • PARI
    is(n)=forstep(k=sqrtint(n-1), 1, -1, if(issquarefree(n-k^2), return(1))); 0 \\ Charles R Greathouse IV, Mar 12 2012

A113763 Non-multiples of 13, or numbers not divisible by 13.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77
Offset: 1

Views

Author

Zak Seidov, Jan 18 2006

Keywords

Comments

Cf. A011760 (Elevator buttons in U.S.A).
Cf. A023806 (all digits in base 12 are different).
Complement of A008595. - Reinhard Zumkeller, Apr 26 2011

Crossrefs

Programs

  • Mathematica
    Table[n+Quotient[2n-1, 24], {n, 1, 85}];(* or *)Table[n+Floor[(2n-1)/24], {n, 1, 85}]
  • PARI
    a(n)=(26*n-1)\24 \\ Charles R Greathouse IV, Jun 08 2015
  • Sage
    [i for i in range(80) if not i%13] # Zerinvary Lajos, Apr 21 2009
    

Formula

a(n) = n+floor((2n-1)/24) = n+quotient(2n-1, 24)

A076805 Triskaidekaphobic or 13-free primes: primes that do not contain the number 13.

Original entry on oeis.org

2, 3, 5, 7, 11, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 127, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307
Offset: 1

Views

Author

Cino Hilliard, Nov 18 2002

Keywords

Examples

			The PARI program will mask out a sequence containing k or mask in a sequence containing k. The program is limited to primes < 400000000.
The PARI program will generate the following for input as shown: kprimes(2,100,7,0) = 2 3 5 11 13 19 23 29 31 41 43 53 59 61 83 89; kprimes(2,1000,13,1) = 13 113 131 137 139 313 613; kprimes(300000,4000000,314159,1) = 314159 3314159 5314159
		

Crossrefs

A generalization of the examples A038603, A038615 etc. for k = 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 by Vasiliy Danilov.
Complement of A166573 with respect to A000040; cf. A011760

Programs

  • Haskell
    import Data.List (isInfixOf)
    a076805 n = a076805_list !! (n-1)
    a076805_list = filter (not . ("13" `isInfixOf`) . show) a000040_list
    -- Reinhard Zumkeller, Nov 09 2011
    
  • Mathematica
    Select[Prime[Range[90]],!MemberQ[Partition[IntegerDigits[#],2,1],{1,3}]&] (* Harvey P. Dale, Mar 25 2012 *)
    Select[Prime[Range[100]],SequenceCount[IntegerDigits[#],{1,3}]==0&] (* Harvey P. Dale, Aug 11 2023 *)
  • PARI
    /* k primes - kprimes.gp. Primes containing or not containing digit k=1,2,3...9,10,11... PARI does not have a good string manipulation capability. This program circumvents that by using the % modulo and floor operators. Also commented out is a log implementation which is slower than string apps. The program either masks out prime numbers k or masks them in.*/
    
  • PARI
    log10(z) = if(z>0,floor(log(z)/log(10))+1,1);\\integer function for log(z) base 10 + 1
    { kprimes(n1,n2,k,t) = \\n1,n2=range,k=mask,t=0 mask out t=1 mask in
    ct=0; pct=0; forprime(p=n1,n2,x=p; f=0;\\x=temp variable to diminish p
    ln = length(Str(p));\\get length of the prime p using strings
    lk = length(Str(k));\\get length of mask integer k using strings
    ln = log10(p);\\get length of the prime p using logs
    lk = log10(k);\\get length of mask integer k using strings
    r = 10^lk; \\set the remainder length = length of k
    for(j=1,ln-lk+1, \\permute through the digits
    d = x % r;\\get lk digits
    if(d==k,f=1; break);\\break for loop if match and set flag
    x = floor(x/10);\\diminish x for next test for k
    ); if(f==t,print1(p" "); ct+=1);\\if no k string of digits,print
    ); print(); print(ct); }
    
  • PARI
    hasNo13(n)=n=digits(n); for(i=2,#n, if(n[i]==3&&n[i-1]==1, return(0))); 1
    select(hasNo13, primes(10^4)) \\ Charles R Greathouse IV, Dec 02 2013
    
  • PARI
    is_A076805(n,t=13)=!until(t>n\=10,t==n%100&&return) \\ M. F. Hasler, Dec 02 2013

Formula

a(n) >> n^1.0044, where the exponent is log(r)/log(10) with r the larger root of x^2 - 10x + 1. [Charles R Greathouse IV, Nov 09 2011]
kfreep(n, k) = true if for primes p over the range n and integer k, p mod 10^(floor(log_10(k))+1) <> k for p = p/10 mod 10^(floor(log_10(k))+1) <> k over the range floor(log_10(k))+1. This is a mathematical definition of the recurrence. In practice it is convenient to use string operations. E.g., If Not Instr(Str(p), Str(k)) then true or k is not a substring of p so list p.

Extensions

Original PARI code restored by M. F. Hasler, Dec 02 2013
Showing 1-4 of 4 results.